{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from sklearn.tree import DecisionTreeRegressor\n",
    "from sklearn.datasets import load_breast_cancer\n",
    "from sklearn.model_selection import train_test_split\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import graphviz "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "455 114 31\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean radius</th>\n",
       "      <th>mean texture</th>\n",
       "      <th>mean perimeter</th>\n",
       "      <th>mean area</th>\n",
       "      <th>mean smoothness</th>\n",
       "      <th>mean compactness</th>\n",
       "      <th>mean concavity</th>\n",
       "      <th>mean concave points</th>\n",
       "      <th>mean symmetry</th>\n",
       "      <th>mean fractal dimension</th>\n",
       "      <th>...</th>\n",
       "      <th>worst texture</th>\n",
       "      <th>worst perimeter</th>\n",
       "      <th>worst area</th>\n",
       "      <th>worst smoothness</th>\n",
       "      <th>worst compactness</th>\n",
       "      <th>worst concavity</th>\n",
       "      <th>worst concave points</th>\n",
       "      <th>worst symmetry</th>\n",
       "      <th>worst fractal dimension</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>17.99</td>\n",
       "      <td>10.38</td>\n",
       "      <td>122.80</td>\n",
       "      <td>1001.0</td>\n",
       "      <td>0.11840</td>\n",
       "      <td>0.27760</td>\n",
       "      <td>0.3001</td>\n",
       "      <td>0.14710</td>\n",
       "      <td>0.2419</td>\n",
       "      <td>0.07871</td>\n",
       "      <td>...</td>\n",
       "      <td>17.33</td>\n",
       "      <td>184.60</td>\n",
       "      <td>2019.0</td>\n",
       "      <td>0.1622</td>\n",
       "      <td>0.6656</td>\n",
       "      <td>0.7119</td>\n",
       "      <td>0.2654</td>\n",
       "      <td>0.4601</td>\n",
       "      <td>0.11890</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20.57</td>\n",
       "      <td>17.77</td>\n",
       "      <td>132.90</td>\n",
       "      <td>1326.0</td>\n",
       "      <td>0.08474</td>\n",
       "      <td>0.07864</td>\n",
       "      <td>0.0869</td>\n",
       "      <td>0.07017</td>\n",
       "      <td>0.1812</td>\n",
       "      <td>0.05667</td>\n",
       "      <td>...</td>\n",
       "      <td>23.41</td>\n",
       "      <td>158.80</td>\n",
       "      <td>1956.0</td>\n",
       "      <td>0.1238</td>\n",
       "      <td>0.1866</td>\n",
       "      <td>0.2416</td>\n",
       "      <td>0.1860</td>\n",
       "      <td>0.2750</td>\n",
       "      <td>0.08902</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>19.69</td>\n",
       "      <td>21.25</td>\n",
       "      <td>130.00</td>\n",
       "      <td>1203.0</td>\n",
       "      <td>0.10960</td>\n",
       "      <td>0.15990</td>\n",
       "      <td>0.1974</td>\n",
       "      <td>0.12790</td>\n",
       "      <td>0.2069</td>\n",
       "      <td>0.05999</td>\n",
       "      <td>...</td>\n",
       "      <td>25.53</td>\n",
       "      <td>152.50</td>\n",
       "      <td>1709.0</td>\n",
       "      <td>0.1444</td>\n",
       "      <td>0.4245</td>\n",
       "      <td>0.4504</td>\n",
       "      <td>0.2430</td>\n",
       "      <td>0.3613</td>\n",
       "      <td>0.08758</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.42</td>\n",
       "      <td>20.38</td>\n",
       "      <td>77.58</td>\n",
       "      <td>386.1</td>\n",
       "      <td>0.14250</td>\n",
       "      <td>0.28390</td>\n",
       "      <td>0.2414</td>\n",
       "      <td>0.10520</td>\n",
       "      <td>0.2597</td>\n",
       "      <td>0.09744</td>\n",
       "      <td>...</td>\n",
       "      <td>26.50</td>\n",
       "      <td>98.87</td>\n",
       "      <td>567.7</td>\n",
       "      <td>0.2098</td>\n",
       "      <td>0.8663</td>\n",
       "      <td>0.6869</td>\n",
       "      <td>0.2575</td>\n",
       "      <td>0.6638</td>\n",
       "      <td>0.17300</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20.29</td>\n",
       "      <td>14.34</td>\n",
       "      <td>135.10</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>0.10030</td>\n",
       "      <td>0.13280</td>\n",
       "      <td>0.1980</td>\n",
       "      <td>0.10430</td>\n",
       "      <td>0.1809</td>\n",
       "      <td>0.05883</td>\n",
       "      <td>...</td>\n",
       "      <td>16.67</td>\n",
       "      <td>152.20</td>\n",
       "      <td>1575.0</td>\n",
       "      <td>0.1374</td>\n",
       "      <td>0.2050</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>0.1625</td>\n",
       "      <td>0.2364</td>\n",
       "      <td>0.07678</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   mean radius  mean texture  mean perimeter  mean area  mean smoothness  \\\n",
       "0        17.99         10.38          122.80     1001.0          0.11840   \n",
       "1        20.57         17.77          132.90     1326.0          0.08474   \n",
       "2        19.69         21.25          130.00     1203.0          0.10960   \n",
       "3        11.42         20.38           77.58      386.1          0.14250   \n",
       "4        20.29         14.34          135.10     1297.0          0.10030   \n",
       "\n",
       "   mean compactness  mean concavity  mean concave points  mean symmetry  \\\n",
       "0           0.27760          0.3001              0.14710         0.2419   \n",
       "1           0.07864          0.0869              0.07017         0.1812   \n",
       "2           0.15990          0.1974              0.12790         0.2069   \n",
       "3           0.28390          0.2414              0.10520         0.2597   \n",
       "4           0.13280          0.1980              0.10430         0.1809   \n",
       "\n",
       "   mean fractal dimension  ...  worst texture  worst perimeter  worst area  \\\n",
       "0                 0.07871  ...          17.33           184.60      2019.0   \n",
       "1                 0.05667  ...          23.41           158.80      1956.0   \n",
       "2                 0.05999  ...          25.53           152.50      1709.0   \n",
       "3                 0.09744  ...          26.50            98.87       567.7   \n",
       "4                 0.05883  ...          16.67           152.20      1575.0   \n",
       "\n",
       "   worst smoothness  worst compactness  worst concavity  worst concave points  \\\n",
       "0            0.1622             0.6656           0.7119                0.2654   \n",
       "1            0.1238             0.1866           0.2416                0.1860   \n",
       "2            0.1444             0.4245           0.4504                0.2430   \n",
       "3            0.2098             0.8663           0.6869                0.2575   \n",
       "4            0.1374             0.2050           0.4000                0.1625   \n",
       "\n",
       "   worst symmetry  worst fractal dimension  y  \n",
       "0          0.4601                  0.11890  0  \n",
       "1          0.2750                  0.08902  0  \n",
       "2          0.3613                  0.08758  0  \n",
       "3          0.6638                  0.17300  0  \n",
       "4          0.2364                  0.07678  0  \n",
       "\n",
       "[5 rows x 31 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "dataset = load_breast_cancer()\n",
    "df = pd.DataFrame(data=dataset.data, columns=dataset.feature_names)\n",
    "feature_names=dataset.feature_names\n",
    "X = df[feature_names].copy()\n",
    "X['one'] = 1\n",
    "X = X.values\n",
    "\n",
    "\n",
    "y=dataset.target\n",
    "y=np.array(y)\n",
    "\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, train_size = 0.8, random_state = 11)\n",
    "\n",
    "n_train=X_train.shape[0]\n",
    "n_test=X_test.shape[0]\n",
    "m=X_train.shape[1]\n",
    "print(n_train, n_test, m)\n",
    "\n",
    "df['y'] = np.array(y)\n",
    "display(df.head(5))\n",
    "\n",
    "feature_names_one=list(feature_names) + [\"one\"]\n",
    "\n",
    "df_train=pd.DataFrame(data=X_train, columns=[feature_names_one])\n",
    "df_train['y'] = y_train\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# XGB Tree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "class SplitResult():\n",
    "    similarity=0\n",
    "    similarity_gain=0\n",
    "    i_feature=-1\n",
    "    split_value=None\n",
    "    split_quantile=0\n",
    "    # left\n",
    "    left_X=None\n",
    "    left_y=None\n",
    "    left_y_previous=None\n",
    "    left_similarity=0\n",
    "    left_n=0\n",
    "    # right\n",
    "    right_X=None\n",
    "    right_y=None\n",
    "    right_y_previous=None\n",
    "    right_similarity=0\n",
    "    right_n=0\n",
    "    \n",
    "class Branch:\n",
    "    no=0\n",
    "    depth=1\n",
    "    i_feature=-1\n",
    "    split_value=0\n",
    "    split_quantile=0\n",
    "    similarity=0\n",
    "    similarity_gain=0\n",
    "    n_samples=0\n",
    "    value=[]\n",
    "    X=None\n",
    "    y=None\n",
    "    y_previous=None\n",
    "    \n",
    "    \n",
    "    left_branch=None\n",
    "    right_branch=None\n",
    "    \n",
    "    def value(self, _lambda):\n",
    "        \n",
    "        return np.sum(self.y)/(np.sum(self.y_previous * (1 - self.y_previous))+_lambda)\n",
    "\n",
    "    \n",
    "    def is_leaf(self):\n",
    "        return self.left_branch is None and self.right_branch is None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import r2_score\n",
    "class XGBTree():\n",
    "    \n",
    "    _lambda=1\n",
    "    node_number=0\n",
    "    the_tree=None\n",
    "    max_depth=3\n",
    "    gamma=2\n",
    "    colsample_bynode=1.0\n",
    "    \n",
    "    def __init__(self, max_depth=3, _lambda=1, gamma=2, colsample_bynode=1.0):\n",
    "        \n",
    "        self.max_depth = max_depth\n",
    "        self._lambda =_lambda\n",
    "        self.gamma = gamma\n",
    "        self.colsample_bynode = colsample_bynode\n",
    "\n",
    "    def get_similarity(self, y, y_previous):\n",
    "        #a=np.array(a)\n",
    "        sim=np.sum(y)**2/(np.sum(y_previous * (1-y_previous))+self._lambda)\n",
    "\n",
    "        return sim\n",
    "    \n",
    "    def get_colsample_bynode_indics(self, n_features):\n",
    "        if n_features==1:\n",
    "            return [1]\n",
    "\n",
    "        if self.colsample_bynode>1:\n",
    "            raise ValueError(\"colsample_bynode must be smaller than or equal to 1.0\")\n",
    "\n",
    "        n_selected_features=int(self.colsample_bynode * n_features)\n",
    "        if n_selected_features==n_features:\n",
    "            return list(range(n_features))\n",
    "\n",
    "\n",
    "        old_list=list(range(n_features))\n",
    "        new_list=[]\n",
    "        for i in range(n_selected_features):\n",
    "            selected = random.choice(old_list)\n",
    "            while selected in new_list:\n",
    "                selected = random.choice(old_list)\n",
    "            new_list.append(selected)\n",
    "        return new_list\n",
    "    \n",
    "    def find_best_split(self, X, y, y_previous):\n",
    "        n_features=X.shape[1]\n",
    "        best_sr=SplitResult()\n",
    "        # colsample_bynode\n",
    "        selected_features = self.get_colsample_bynode_indics(n_features)\n",
    "        for i_feature in selected_features:\n",
    "            f=X[:,i_feature]\n",
    "            # Approximate Algorithm \n",
    "            # Instead of Basic Exact Greedy Algorithm\n",
    "            quantiles = np.quantile(f, [.25,.5,.75]) \n",
    "            for split_value, split_quantile in zip(quantiles, [.25,.5,.75]):\n",
    "                sr = SplitResult()\n",
    "                sr.i_feature=i_feature\n",
    "                condition = f<split_value\n",
    "                #print(condition)\n",
    "                # left\n",
    "                sr.left_y = y[condition]\n",
    "                sr.left_y_previous=y_previous[condition]\n",
    "                sr.left_n = len(sr.left_y)\n",
    "                if sr.left_n == 0:\n",
    "                    continue\n",
    "                sr.left_similarity = self.get_similarity(sr.left_y, sr.left_y_previous)\n",
    "\n",
    "                # right\n",
    "                sr.right_y = y[~condition]\n",
    "                sr.right_y_previous=y_previous[~condition]\n",
    "                sr.right_n = len(sr.right_y)\n",
    "                if sr.right_n == 0:\n",
    "                    continue\n",
    "                sr.right_similarity = self.get_similarity(sr.right_y, sr.right_y_previous)\n",
    "\n",
    "                sr.similarity = sr.left_similarity + sr.right_similarity\n",
    "                #sr.print_me()\n",
    "                if sr.similarity>best_sr.similarity:\n",
    "                    best_sr=sr\n",
    "                    best_sr.left_X = X[condition,:]\n",
    "                    best_sr.right_X = X[~condition,:]\n",
    "                    best_sr.split_value = split_value\n",
    "                    best_sr.split_quantile = split_quantile\n",
    "        return best_sr\n",
    "    \n",
    "\n",
    "    def fit_inner(self, X, y, y_previous, depth, branch_similarity):\n",
    "        branch = Branch()\n",
    "        branch.no=self.node_number\n",
    "        self.node_number+=1\n",
    "        branch.similarity=branch_similarity\n",
    "        branch.n_samples = len(y)\n",
    "        branch.X=X\n",
    "        branch.y=y\n",
    "        branch.y_previous = y_previous\n",
    "\n",
    "        if depth==self.max_depth:\n",
    "            #print(\"leaf\")\n",
    "\n",
    "            return branch\n",
    "        else:\n",
    "            sr=self.find_best_split(X, y, y_previous)\n",
    "            if sr.i_feature==-1:\n",
    "                return branch\n",
    "\n",
    "            sr.similarity_gain=sr.similarity-branch_similarity\n",
    "\n",
    "            #sr.print_me()\n",
    "            branch.i_feature=sr.i_feature\n",
    "            branch.split_value = sr.split_value\n",
    "            branch.split_quantile = sr.split_quantile\n",
    "            branch.similarity_gain=sr.similarity_gain\n",
    "            #print(\"branch\")\n",
    "            branch.left_branch=self.fit_inner(sr.left_X, sr.left_y, sr.left_y_previous, depth+1, branch_similarity=sr.left_similarity)\n",
    "            branch.right_branch=self.fit_inner(sr.right_X, sr.right_y, sr.right_y_previous, depth+1, branch_similarity=sr.right_similarity)\n",
    "\n",
    "            return branch\n",
    "        \n",
    "    def fit(self, X, y, y_previous):\n",
    "        self.node_number=0\n",
    "        similarity=self.get_similarity(y, y_previous)\n",
    "        self.tree=self.fit_inner(X, y, y_previous, 0, branch_similarity=similarity)\n",
    "        \n",
    "    def prune_inner(self, b: Branch):\n",
    "        if b.is_leaf():\n",
    "            return\n",
    "        self.prune_inner(b.left_branch)\n",
    "        self.prune_inner(b.right_branch)\n",
    "        if b.left_branch.is_leaf() and b.right_branch.is_leaf():\n",
    "            if b.similarity_gain<self.gamma:\n",
    "                b.left_branch=None\n",
    "                b.right_branch=None\n",
    "        \n",
    "    def prune(self):\n",
    "        self.prune_inner(self.tree)\n",
    "        \n",
    "    def predict_one_inner(self, tree:Branch, x):\n",
    "        if tree.is_leaf():\n",
    "            return tree.value(self._lambda)\n",
    "        if x[tree.i_feature]<tree.split_value:\n",
    "            return self.predict_one_inner(tree.left_branch, x)\n",
    "        else:\n",
    "            return self.predict_one_inner(tree.right_branch, x)\n",
    "\n",
    "    def predict_inner(self, tree:Branch, X):\n",
    "        y=[]\n",
    "        for x in X:\n",
    "            t=self.predict_one_inner(tree, x)\n",
    "            y.append(t)\n",
    "        return np.array(y)\n",
    "\n",
    "    def predict(self, X):\n",
    "        return self.predict_inner(self.tree, X)\n",
    "    \n",
    "    def score(self, X, y):\n",
    "        y_hat = self.predict(X)\n",
    "        return r2_score(y, y_hat)\n",
    "\n",
    "    def export_graphviz_inner(self, the_branch:Branch, dot_data:str):\n",
    "        fillcolor = \"#ffffff\"\n",
    "        if the_branch.similarity_gain < self.gamma:\n",
    "            fillcolor = \"#ffaaaa\"\n",
    "        if the_branch.similarity_gain < 0:\n",
    "            fillcolor = \"#ff4444\"\n",
    "\n",
    "        if the_branch.is_leaf():\n",
    "            n_positive = sum(the_branch.y>=0)\n",
    "            n_negative = sum(the_branch.y<0)\n",
    "            dot_data += f\"{the_branch.no} [label=\\\"{the_branch.no}\\n\"+ \\\n",
    "            f\"samples={the_branch.n_samples:0.0f}\\\\n\" + \\\n",
    "            f\"+/- = {n_positive}/{n_negative}\\\\n\" + \\\n",
    "            f\"value={the_branch.value(self._lambda):0.3f}\\\\n\" + \\\n",
    "            f\"\\\", fillcolor=\\\"#22ee22\\\"];\"\n",
    "        else:\n",
    "            dot_data += f\"{the_branch.no} [label=\\\"{the_branch.no}\\n\"+ \\\n",
    "            f\"{feature_names[the_branch.i_feature]} <= {the_branch.split_value:0.3f}\\\\n\" + \\\n",
    "            f\"split_quantile = {the_branch.split_quantile:0.2f}\\\\n\" + \\\n",
    "            f\"samples = {the_branch.n_samples:0.0f}\\\\n\" + \\\n",
    "            f\"sim_gain = {the_branch.similarity_gain:0.3f}\\\\n\" + \\\n",
    "            f\"\\\", fillcolor=\\\"{fillcolor}\\\"];\"\n",
    "        #print(branch_str)\n",
    "        if not the_branch.left_branch is None:\n",
    "            left_branch=the_branch.left_branch\n",
    "            if left_branch.no>0:\n",
    "                dot_data += f\"{the_branch.no} -> {left_branch.no} ;\"\n",
    "                dot_data = self.export_graphviz_inner(left_branch, dot_data)\n",
    "        if not the_branch.right_branch is None:\n",
    "            right_branch=the_branch.right_branch\n",
    "            if right_branch.no>0:\n",
    "                dot_data += f\"{the_branch.no} -> {right_branch.no} ;\"\n",
    "                dot_data = self.export_graphviz_inner(right_branch, dot_data)\n",
    "        return dot_data\n",
    "\n",
    "    def export_graphviz(self):\n",
    "        dot_data=\"\"\"digraph Tree {\\nnode [shape=box, style=\"filled, rounded\", color=\"black\", fontname=helvetica] ;\\nedge [fontname=helvetica] ;\\n\"\"\"\n",
    "        dot_data+=self.export_graphviz_inner(self.tree, \"\")\n",
    "        dot_data+=\"}\"\n",
    "        dot_data=dot_data.replace(\"\\r\\n\",\"\\n\")\n",
    "        return dot_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train0 = np.array([0.5] * len(y_train)) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"956pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 956.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 952,-429 952,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M558,-425C558,-425 398,-425 398,-425 392,-425 386,-419 386,-413 386,-413 386,-354 386,-354 386,-348 392,-342 398,-342 398,-342 558,-342 558,-342 564,-342 570,-348 570,-354 570,-354 570,-413 570,-413 570,-419 564,-425 558,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 99.000</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 225.441</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M445.5,-306C445.5,-306 302.5,-306 302.5,-306 296.5,-306 290.5,-300 290.5,-294 290.5,-294 290.5,-235 290.5,-235 290.5,-229 296.5,-223 302.5,-223 302.5,-223 445.5,-223 445.5,-223 451.5,-223 457.5,-229 457.5,-235 457.5,-235 457.5,-294 457.5,-294 457.5,-300 451.5,-306 445.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 20.110</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;2.380</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M441.918,-341.907C433.851,-332.832 425.219,-323.121 416.906,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"419.278,-311.17 410.018,-306.021 414.046,-315.82 419.278,-311.17\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M676,-306C676,-306 488,-306 488,-306 482,-306 476,-300 476,-294 476,-294 476,-235 476,-235 476,-229 482,-223 488,-223 488,-223 676,-223 676,-223 682,-223 688,-229 688,-235 688,-235 688,-294 688,-294 688,-300 682,-306 676,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.048</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 75.884</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M514.082,-341.907C522.149,-332.832 530.781,-323.121 539.094,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"541.954,-315.82 545.982,-306.021 536.722,-311.17 541.954,-315.82\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M238.5,-187C238.5,-187 95.5,-187 95.5,-187 89.5,-187 83.5,-181 83.5,-175 83.5,-175 83.5,-116 83.5,-116 83.5,-110 89.5,-104 95.5,-104 95.5,-104 238.5,-104 238.5,-104 244.5,-104 250.5,-110 250.5,-116 250.5,-116 250.5,-175 250.5,-175 250.5,-181 244.5,-187 238.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 18.067</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 170</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;2.884</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M302.182,-222.907C284.521,-212.925 265.497,-202.172 247.457,-191.976\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"249.119,-188.894 238.691,-187.021 245.674,-194.988 249.119,-188.894\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M469,-187C469,-187 281,-187 281,-187 275,-187 269,-181 269,-175 269,-175 269,-116 269,-116 269,-110 275,-104 281,-104 281,-104 469,-104 469,-104 475,-104 481,-110 481,-116 481,-116 481,-175 481,-175 481,-181 475,-187 469,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.029</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.315</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M374.347,-222.907C374.418,-214.649 374.493,-205.864 374.566,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"378.068,-197.05 374.654,-187.021 371.068,-196.99 378.068,-197.05\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-68C92,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 92,-0 92,-0 98,-0 104,-6 104,-12 104,-12 104,-56 104,-56 104,-62 98,-68 92,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=127</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 127/0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M124.178,-103.726C114.408,-94.423 104.031,-84.5428 94.2834,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"96.6279,-72.6606 86.9722,-68.2996 91.8008,-77.7301 96.6279,-72.6606\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 134.5,-68 134.5,-68 128.5,-68 122.5,-62 122.5,-56 122.5,-56 122.5,-12 122.5,-12 122.5,-6 128.5,-0 134.5,-0 134.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 41/2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.660</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M168.117,-103.726C168.342,-95.5175 168.579,-86.8595 168.807,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"172.312,-78.3917 169.088,-68.2996 165.315,-78.2 172.312,-78.3917\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M338.5,-68C338.5,-68 267.5,-68 267.5,-68 261.5,-68 255.5,-62 255.5,-56 255.5,-56 255.5,-12 255.5,-12 255.5,-6 261.5,-0 267.5,-0 267.5,-0 338.5,-0 338.5,-0 344.5,-0 350.5,-6 350.5,-12 350.5,-12 350.5,-56 350.5,-56 350.5,-62 344.5,-68 338.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 41/1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.739</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M348.19,-103.726C342.432,-94.9703 336.339,-85.7032 330.554,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"333.314,-74.7322 324.896,-68.2996 327.465,-78.5781 333.314,-74.7322\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M451.5,-68C451.5,-68 380.5,-68 380.5,-68 374.5,-68 368.5,-62 368.5,-56 368.5,-56 368.5,-12 368.5,-12 368.5,-6 374.5,-0 380.5,-0 380.5,-0 451.5,-0 451.5,-0 457.5,-0 463.5,-6 463.5,-12 463.5,-12 463.5,-56 463.5,-56 463.5,-62 457.5,-68 451.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 12/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.947</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M390.267,-103.726C393.443,-95.2439 396.799,-86.2819 400,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"403.303,-78.892 403.532,-68.2996 396.747,-76.4373 403.303,-78.892\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M653,-187C653,-187 511,-187 511,-187 505,-187 499,-181 499,-175 499,-175 499,-116 499,-116 499,-110 505,-104 511,-104 511,-104 653,-104 653,-104 659,-104 665,-110 665,-116 665,-116 665,-175 665,-175 665,-181 659,-187 653,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 30.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 13.736</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M582,-222.907C582,-214.649 582,-205.864 582,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"585.5,-197.021 582,-187.021 578.5,-197.021 585.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M863,-187C863,-187 695,-187 695,-187 689,-187 683,-181 683,-175 683,-175 683,-116 683,-116 683,-110 689,-104 695,-104 695,-104 863,-104 863,-104 869,-104 875,-110 875,-116 875,-116 875,-175 875,-175 875,-181 869,-187 863,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 119.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 16.290</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M650.348,-222.907C667.004,-213.016 684.932,-202.368 701.961,-192.254\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"703.962,-195.137 710.773,-187.021 700.387,-189.118 703.962,-195.137\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M574.5,-68C574.5,-68 503.5,-68 503.5,-68 497.5,-68 491.5,-62 491.5,-56 491.5,-56 491.5,-12 491.5,-12 491.5,-6 497.5,-0 503.5,-0 503.5,-0 574.5,-0 574.5,-0 580.5,-0 586.5,-6 586.5,-12 586.5,-12 586.5,-56 586.5,-56 586.5,-62 580.5,-68 574.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 39/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.565</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M565.988,-103.726C562.657,-95.2439 559.138,-86.2819 555.78,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"558.99,-76.3283 552.077,-68.2996 552.474,-78.887 558.99,-76.3283\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M691.5,-68C691.5,-68 616.5,-68 616.5,-68 610.5,-68 604.5,-62 604.5,-56 604.5,-56 604.5,-12 604.5,-12 604.5,-6 610.5,-0 616.5,-0 616.5,-0 691.5,-0 691.5,-0 697.5,-0 703.5,-6 703.5,-12 703.5,-12 703.5,-56 703.5,-56 703.5,-62 697.5,-68 691.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 5/10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.526</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M608.81,-103.726C614.568,-94.9703 620.661,-85.7032 626.446,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"629.535,-78.5781 632.104,-68.2996 623.686,-74.7322 629.535,-78.5781\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M813.5,-68C813.5,-68 738.5,-68 738.5,-68 732.5,-68 726.5,-62 726.5,-56 726.5,-56 726.5,-12 726.5,-12 726.5,-6 732.5,-0 738.5,-0 738.5,-0 813.5,-0 813.5,-0 819.5,-0 825.5,-6 825.5,-12 825.5,-12 825.5,-56 825.5,-56 825.5,-62 819.5,-68 813.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 16/27</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.468</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M777.883,-103.726C777.658,-95.5175 777.421,-86.8595 777.193,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"780.685,-78.2 776.912,-68.2996 773.688,-78.3917 780.685,-78.2\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M936,-68C936,-68 856,-68 856,-68 850,-68 844,-62 844,-56 844,-56 844,-12 844,-12 844,-6 850,-0 856,-0 856,-0 936,-0 936,-0 942,-0 948,-6 948,-12 948,-12 948,-56 948,-56 948,-62 942,-68 936,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M822.566,-103.726C832.507,-94.423 843.064,-84.5428 852.981,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"855.51,-77.6882 860.42,-68.2996 850.727,-72.5774 855.51,-77.6882\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x211d04eea00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "xdt = XGBTree()\n",
    "xdt.fit(X_train, y_train-y_train0, y_train0)\n",
    "dot_data=xdt.export_graphviz()\n",
    "graph = graphviz.Source(dot_data) \n",
    "display(graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"500pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 499.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 495.5,-429 495.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M232.5,-425C232.5,-425 72.5,-425 72.5,-425 66.5,-425 60.5,-419 60.5,-413 60.5,-413 60.5,-354 60.5,-354 60.5,-348 66.5,-342 72.5,-342 72.5,-342 232.5,-342 232.5,-342 238.5,-342 244.5,-348 244.5,-354 244.5,-354 244.5,-413 244.5,-413 244.5,-419 238.5,-425 232.5,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 99.000</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 225.441</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M104.5,-298.5C104.5,-298.5 24.5,-298.5 24.5,-298.5 18.5,-298.5 12.5,-292.5 12.5,-286.5 12.5,-286.5 12.5,-242.5 12.5,-242.5 12.5,-236.5 18.5,-230.5 24.5,-230.5 24.5,-230.5 104.5,-230.5 104.5,-230.5 110.5,-230.5 116.5,-236.5 116.5,-242.5 116.5,-242.5 116.5,-286.5 116.5,-286.5 116.5,-292.5 110.5,-298.5 104.5,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 221/6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.861</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M121.969,-341.907C113.42,-330.542 104.121,-318.178 95.5435,-306.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"98.2542,-304.555 89.4461,-298.667 92.6599,-308.763 98.2542,-304.555\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M334.5,-306C334.5,-306 146.5,-306 146.5,-306 140.5,-306 134.5,-300 134.5,-294 134.5,-294 134.5,-235 134.5,-235 134.5,-229 140.5,-223 146.5,-223 146.5,-223 334.5,-223 334.5,-223 340.5,-223 346.5,-229 346.5,-235 346.5,-235 346.5,-294 346.5,-294 346.5,-300 340.5,-306 334.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.048</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 75.884</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M183.031,-341.907C189.789,-332.923 197.015,-323.315 203.984,-314.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"206.809,-316.116 210.023,-306.021 201.215,-311.909 206.809,-316.116\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M213.5,-187C213.5,-187 71.5,-187 71.5,-187 65.5,-187 59.5,-181 59.5,-175 59.5,-175 59.5,-116 59.5,-116 59.5,-110 65.5,-104 71.5,-104 71.5,-104 213.5,-104 213.5,-104 219.5,-104 225.5,-110 225.5,-116 225.5,-116 225.5,-175 225.5,-175 225.5,-181 219.5,-187 213.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 30.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 13.736</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M206.499,-222.907C198.898,-213.832 190.764,-204.121 182.931,-194.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"185.545,-192.439 176.441,-187.021 180.179,-196.934 185.545,-192.439\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M423.5,-187C423.5,-187 255.5,-187 255.5,-187 249.5,-187 243.5,-181 243.5,-175 243.5,-175 243.5,-116 243.5,-116 243.5,-110 249.5,-104 255.5,-104 255.5,-104 423.5,-104 423.5,-104 429.5,-104 435.5,-110 435.5,-116 435.5,-116 435.5,-175 435.5,-175 435.5,-181 429.5,-187 423.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 119.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 16.290</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M274.848,-222.907C282.526,-213.832 290.744,-204.121 298.657,-194.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"301.426,-196.916 305.213,-187.021 296.082,-192.394 301.426,-196.916\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M83,-68C83,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 83,-0 83,-0 89,-0 95,-6 95,-12 95,-12 95,-56 95,-56 95,-62 89,-68 83,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 39/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.565</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M107.126,-103.726C99.2916,-94.6966 90.9861,-85.1235 83.1416,-76.0816\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"85.5871,-73.5595 76.3901,-68.2996 80.2996,-78.1467 85.5871,-73.5595\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M200,-68C200,-68 125,-68 125,-68 119,-68 113,-62 113,-56 113,-56 113,-12 113,-12 113,-6 119,-0 125,-0 125,-0 200,-0 200,-0 206,-0 212,-6 212,-12 212,-12 212,-56 212,-56 212,-62 206,-68 200,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 5/10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.526</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M149.947,-103.726C151.463,-95.4263 153.063,-86.6671 154.594,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"158.064,-78.7658 156.418,-68.2996 151.178,-77.508 158.064,-78.7658\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M357,-68C357,-68 282,-68 282,-68 276,-68 270,-62 270,-56 270,-56 270,-12 270,-12 270,-6 276,-0 282,-0 282,-0 357,-0 357,-0 363,-0 369,-6 369,-12 369,-12 369,-56 369,-56 369,-62 363,-68 357,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 16/27</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.468</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M332.053,-103.726C330.537,-95.4263 328.937,-86.6671 327.406,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"330.822,-77.508 325.582,-68.2996 323.936,-78.7658 330.822,-77.508\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M479.5,-68C479.5,-68 399.5,-68 399.5,-68 393.5,-68 387.5,-62 387.5,-56 387.5,-56 387.5,-12 387.5,-12 387.5,-6 393.5,-0 399.5,-0 399.5,-0 479.5,-0 479.5,-0 485.5,-0 491.5,-6 491.5,-12 491.5,-12 491.5,-56 491.5,-56 491.5,-62 485.5,-68 479.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M376.736,-103.726C385.066,-94.6054 393.902,-84.93 402.233,-75.8078\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"404.93,-78.044 409.089,-68.2996 399.761,-73.3235 404.93,-78.044\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5e6310>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "xdt.prune()\n",
    "dot_data=xdt.export_graphviz()\n",
    "graph = graphviz.Source(dot_data) \n",
    "display(graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 1 Average"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>mean radius</th>\n",
       "      <th>mean texture</th>\n",
       "      <th>mean perimeter</th>\n",
       "      <th>mean area</th>\n",
       "      <th>mean smoothness</th>\n",
       "      <th>mean compactness</th>\n",
       "      <th>mean concavity</th>\n",
       "      <th>mean concave points</th>\n",
       "      <th>mean symmetry</th>\n",
       "      <th>mean fractal dimension</th>\n",
       "      <th>...</th>\n",
       "      <th>worst smoothness</th>\n",
       "      <th>worst compactness</th>\n",
       "      <th>worst concavity</th>\n",
       "      <th>worst concave points</th>\n",
       "      <th>worst symmetry</th>\n",
       "      <th>worst fractal dimension</th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$f_0$</th>\n",
       "      <th>$r_0$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>19.69</td>\n",
       "      <td>21.25</td>\n",
       "      <td>130.00</td>\n",
       "      <td>1203.0</td>\n",
       "      <td>0.10960</td>\n",
       "      <td>0.15990</td>\n",
       "      <td>0.197400</td>\n",
       "      <td>0.127900</td>\n",
       "      <td>0.2069</td>\n",
       "      <td>0.05999</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1444</td>\n",
       "      <td>0.42450</td>\n",
       "      <td>0.45040</td>\n",
       "      <td>0.24300</td>\n",
       "      <td>0.3613</td>\n",
       "      <td>0.08758</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>12.31</td>\n",
       "      <td>16.52</td>\n",
       "      <td>79.19</td>\n",
       "      <td>470.9</td>\n",
       "      <td>0.09172</td>\n",
       "      <td>0.06829</td>\n",
       "      <td>0.033720</td>\n",
       "      <td>0.022720</td>\n",
       "      <td>0.1720</td>\n",
       "      <td>0.05914</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1176</td>\n",
       "      <td>0.18430</td>\n",
       "      <td>0.17030</td>\n",
       "      <td>0.08660</td>\n",
       "      <td>0.2618</td>\n",
       "      <td>0.07609</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>11.63</td>\n",
       "      <td>29.29</td>\n",
       "      <td>74.87</td>\n",
       "      <td>415.1</td>\n",
       "      <td>0.09357</td>\n",
       "      <td>0.08574</td>\n",
       "      <td>0.071600</td>\n",
       "      <td>0.020170</td>\n",
       "      <td>0.1799</td>\n",
       "      <td>0.06166</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1406</td>\n",
       "      <td>0.20310</td>\n",
       "      <td>0.29230</td>\n",
       "      <td>0.06835</td>\n",
       "      <td>0.2884</td>\n",
       "      <td>0.07220</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>21.56</td>\n",
       "      <td>22.39</td>\n",
       "      <td>142.00</td>\n",
       "      <td>1479.0</td>\n",
       "      <td>0.11100</td>\n",
       "      <td>0.11590</td>\n",
       "      <td>0.243900</td>\n",
       "      <td>0.138900</td>\n",
       "      <td>0.1726</td>\n",
       "      <td>0.05623</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1410</td>\n",
       "      <td>0.21130</td>\n",
       "      <td>0.41070</td>\n",
       "      <td>0.22160</td>\n",
       "      <td>0.2060</td>\n",
       "      <td>0.07115</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>11.04</td>\n",
       "      <td>16.83</td>\n",
       "      <td>70.92</td>\n",
       "      <td>373.2</td>\n",
       "      <td>0.10770</td>\n",
       "      <td>0.07804</td>\n",
       "      <td>0.030460</td>\n",
       "      <td>0.024800</td>\n",
       "      <td>0.1714</td>\n",
       "      <td>0.06340</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1369</td>\n",
       "      <td>0.14820</td>\n",
       "      <td>0.10670</td>\n",
       "      <td>0.07431</td>\n",
       "      <td>0.2998</td>\n",
       "      <td>0.07881</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>11.22</td>\n",
       "      <td>19.86</td>\n",
       "      <td>71.94</td>\n",
       "      <td>387.3</td>\n",
       "      <td>0.10540</td>\n",
       "      <td>0.06779</td>\n",
       "      <td>0.005006</td>\n",
       "      <td>0.007583</td>\n",
       "      <td>0.1940</td>\n",
       "      <td>0.06028</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1424</td>\n",
       "      <td>0.09669</td>\n",
       "      <td>0.01335</td>\n",
       "      <td>0.02022</td>\n",
       "      <td>0.3292</td>\n",
       "      <td>0.06522</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>10.71</td>\n",
       "      <td>20.39</td>\n",
       "      <td>69.50</td>\n",
       "      <td>344.9</td>\n",
       "      <td>0.10820</td>\n",
       "      <td>0.12890</td>\n",
       "      <td>0.084480</td>\n",
       "      <td>0.028670</td>\n",
       "      <td>0.1668</td>\n",
       "      <td>0.06862</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1335</td>\n",
       "      <td>0.25500</td>\n",
       "      <td>0.25340</td>\n",
       "      <td>0.08600</td>\n",
       "      <td>0.2605</td>\n",
       "      <td>0.08701</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>18.77</td>\n",
       "      <td>21.43</td>\n",
       "      <td>122.90</td>\n",
       "      <td>1092.0</td>\n",
       "      <td>0.09116</td>\n",
       "      <td>0.14020</td>\n",
       "      <td>0.106000</td>\n",
       "      <td>0.060900</td>\n",
       "      <td>0.1953</td>\n",
       "      <td>0.06083</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1498</td>\n",
       "      <td>0.48270</td>\n",
       "      <td>0.46340</td>\n",
       "      <td>0.20480</td>\n",
       "      <td>0.3679</td>\n",
       "      <td>0.09870</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>15.37</td>\n",
       "      <td>22.76</td>\n",
       "      <td>100.20</td>\n",
       "      <td>728.2</td>\n",
       "      <td>0.09200</td>\n",
       "      <td>0.10360</td>\n",
       "      <td>0.112200</td>\n",
       "      <td>0.074830</td>\n",
       "      <td>0.1717</td>\n",
       "      <td>0.06097</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1257</td>\n",
       "      <td>0.19970</td>\n",
       "      <td>0.28460</td>\n",
       "      <td>0.14760</td>\n",
       "      <td>0.2556</td>\n",
       "      <td>0.06828</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>11.45</td>\n",
       "      <td>20.97</td>\n",
       "      <td>73.81</td>\n",
       "      <td>401.5</td>\n",
       "      <td>0.11020</td>\n",
       "      <td>0.09362</td>\n",
       "      <td>0.045910</td>\n",
       "      <td>0.022330</td>\n",
       "      <td>0.1842</td>\n",
       "      <td>0.07005</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1557</td>\n",
       "      <td>0.16760</td>\n",
       "      <td>0.17550</td>\n",
       "      <td>0.06127</td>\n",
       "      <td>0.2762</td>\n",
       "      <td>0.08851</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 34 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    mean radius mean texture mean perimeter mean area mean smoothness  \\\n",
       "0         19.69        21.25         130.00    1203.0         0.10960   \n",
       "1         12.31        16.52          79.19     470.9         0.09172   \n",
       "2         11.63        29.29          74.87     415.1         0.09357   \n",
       "3         21.56        22.39         142.00    1479.0         0.11100   \n",
       "4         11.04        16.83          70.92     373.2         0.10770   \n",
       "..          ...          ...            ...       ...             ...   \n",
       "450       11.22        19.86          71.94     387.3         0.10540   \n",
       "451       10.71        20.39          69.50     344.9         0.10820   \n",
       "452       18.77        21.43         122.90    1092.0         0.09116   \n",
       "453       15.37        22.76         100.20     728.2         0.09200   \n",
       "454       11.45        20.97          73.81     401.5         0.11020   \n",
       "\n",
       "    mean compactness mean concavity mean concave points mean symmetry  \\\n",
       "0            0.15990       0.197400            0.127900        0.2069   \n",
       "1            0.06829       0.033720            0.022720        0.1720   \n",
       "2            0.08574       0.071600            0.020170        0.1799   \n",
       "3            0.11590       0.243900            0.138900        0.1726   \n",
       "4            0.07804       0.030460            0.024800        0.1714   \n",
       "..               ...            ...                 ...           ...   \n",
       "450          0.06779       0.005006            0.007583        0.1940   \n",
       "451          0.12890       0.084480            0.028670        0.1668   \n",
       "452          0.14020       0.106000            0.060900        0.1953   \n",
       "453          0.10360       0.112200            0.074830        0.1717   \n",
       "454          0.09362       0.045910            0.022330        0.1842   \n",
       "\n",
       "    mean fractal dimension  ... worst smoothness worst compactness  \\\n",
       "0                  0.05999  ...           0.1444           0.42450   \n",
       "1                  0.05914  ...           0.1176           0.18430   \n",
       "2                  0.06166  ...           0.1406           0.20310   \n",
       "3                  0.05623  ...           0.1410           0.21130   \n",
       "4                  0.06340  ...           0.1369           0.14820   \n",
       "..                     ...  ...              ...               ...   \n",
       "450                0.06028  ...           0.1424           0.09669   \n",
       "451                0.06862  ...           0.1335           0.25500   \n",
       "452                0.06083  ...           0.1498           0.48270   \n",
       "453                0.06097  ...           0.1257           0.19970   \n",
       "454                0.07005  ...           0.1557           0.16760   \n",
       "\n",
       "    worst concavity worst concave points worst symmetry  \\\n",
       "0           0.45040              0.24300         0.3613   \n",
       "1           0.17030              0.08660         0.2618   \n",
       "2           0.29230              0.06835         0.2884   \n",
       "3           0.41070              0.22160         0.2060   \n",
       "4           0.10670              0.07431         0.2998   \n",
       "..              ...                  ...            ...   \n",
       "450         0.01335              0.02022         0.3292   \n",
       "451         0.25340              0.08600         0.2605   \n",
       "452         0.46340              0.20480         0.3679   \n",
       "453         0.28460              0.14760         0.2556   \n",
       "454         0.17550              0.06127         0.2762   \n",
       "\n",
       "    worst fractal dimension  one  y $f_0$ $r_0$  \n",
       "0                   0.08758  1.0  0   1.0  -0.5  \n",
       "1                   0.07609  1.0  1   1.0   0.5  \n",
       "2                   0.07220  1.0  1   1.0   0.5  \n",
       "3                   0.07115  1.0  0   1.0  -0.5  \n",
       "4                   0.07881  1.0  1   1.0   0.5  \n",
       "..                      ...  ... ..   ...   ...  \n",
       "450                 0.06522  1.0  1   1.0   0.5  \n",
       "451                 0.08701  1.0  1   1.0   0.5  \n",
       "452                 0.09870  1.0  0   1.0  -0.5  \n",
       "453                 0.06828  1.0  0   1.0  -0.5  \n",
       "454                 0.08851  1.0  1   1.0   0.5  \n",
       "\n",
       "[455 rows x 34 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.6931471805599453\n"
     ]
    }
   ],
   "source": [
    "#now let's get started\n",
    "learning_rate=0.3\n",
    "loss = [0] * 6\n",
    "residuals = np.zeros([6,n_train])\n",
    "probabilities = np.zeros([6,n_train])\n",
    "predictions = np.zeros([6,n_train])\n",
    "log_of_odds = np.zeros([6,n_train])\n",
    "gamma = np.zeros([6,n_train])\n",
    "log_of_odds[0] = [0] * n_train\n",
    "#calculation\n",
    "#average_y=y.mean()\n",
    "probabilities[0] = [0.5] * n_train\n",
    "predictions[0] = [1] * n_train\n",
    "residuals[0] = y_train - probabilities[0]\n",
    "df_train['$f_0$']=np.array(predictions[0]).reshape((-1, 1))\n",
    "df_train['$r_0$']=np.array(residuals[0]).reshape((-1, 1))\n",
    "display(df_train)\n",
    "loss0=-(y_train*np.log(probabilities[0])+(1-y_train)*np.log(1-probabilities[0]))\n",
    "loss[0] = np.sum(loss0) / n_train\n",
    "print(loss[0])\n",
    "trees = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the first step, we calculate the average 71.2 as the initial prediction. The pseudo residuals are 16.8, 4.8, etc."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 2 For Loop"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def iterate(i):\n",
    "    t = XGBTree(max_depth=3, gamma=5)\n",
    "    t.fit(X_train,residuals[i], probabilities[i])\n",
    "    trees.append(t)\n",
    "    \n",
    "    dot_data = t.export_graphviz()\n",
    "    graph = graphviz.Source(dot_data) \n",
    "    display(graph)\n",
    "    t.prune()\n",
    "    dot_data = t.export_graphviz()\n",
    "    graph = graphviz.Source(dot_data) \n",
    "    display(graph)\n",
    "    #next prediction, residual\n",
    "    gamma[i]=t.predict(X_train)\n",
    "    log_of_odds[i+1] = log_of_odds[i] + 0.3 * gamma[i]\n",
    "    probabilities[i+1] = np.array([np.exp(odds)/(np.exp(odds)+1) for odds in log_of_odds[i+1]])\n",
    "    predictions[i+1] = (probabilities[i+1]>0.5)*1.0\n",
    "    residuals[i+1]=y_train-probabilities[i+1]\n",
    "    loss[i+1]=np.sum(-y_train * log_of_odds[i+1] + np.log(1+np.exp(log_of_odds[i+1])))\n",
    "    loss[i+1]=loss[i+1]/n_train\n",
    "    y_hat=t.predict(X_train)\n",
    "    \n",
    "    new_df=df_train[['one','y']].copy()\n",
    "    #new_df.columns=['name', 'popcorn','age','color','y']\n",
    "    new_df[f'$p_{i}$']=probabilities[i]\n",
    "    new_df[f'$l_{i}$']=log_of_odds[i]\n",
    "    new_df[f'$r_{i}$']=residuals[i]\n",
    "    new_df[f'$\\gamma_{i}$']=gamma[i]\n",
    "    new_df[f'$l_{i+1}$']=log_of_odds[i+1]\n",
    "    new_df[f'$p_{i+1}$']=probabilities[i+1]\n",
    "    display(new_df)\n",
    "    \n",
    "    #df_train[f'$\\gamma_{i+1}$']=y_hat.reshape((-1,1))\n",
    "    #df_train[f'$f_{i+1}$']=np.array(prediction[i+1]).reshape((-1,1))\n",
    "    #df_train[f'$r_{i+1}$']=np.array(residuals[i+1]).reshape((-1,1))\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"956pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 956.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 952,-429 952,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M558,-425C558,-425 398,-425 398,-425 392,-425 386,-419 386,-413 386,-413 386,-354 386,-354 386,-348 392,-342 398,-342 398,-342 558,-342 558,-342 564,-342 570,-348 570,-354 570,-354 570,-413 570,-413 570,-419 564,-425 558,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 99.000</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"478\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 225.441</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M445.5,-306C445.5,-306 302.5,-306 302.5,-306 296.5,-306 290.5,-300 290.5,-294 290.5,-294 290.5,-235 290.5,-235 290.5,-229 296.5,-223 302.5,-223 302.5,-223 445.5,-223 445.5,-223 451.5,-223 457.5,-229 457.5,-235 457.5,-235 457.5,-294 457.5,-294 457.5,-300 451.5,-306 445.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 20.110</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;2.380</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M441.918,-341.907C433.851,-332.832 425.219,-323.121 416.906,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"419.278,-311.17 410.018,-306.021 414.046,-315.82 419.278,-311.17\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M676,-306C676,-306 488,-306 488,-306 482,-306 476,-300 476,-294 476,-294 476,-235 476,-235 476,-229 482,-223 488,-223 488,-223 676,-223 676,-223 682,-223 688,-229 688,-235 688,-235 688,-294 688,-294 688,-300 682,-306 676,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.048</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 75.884</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M514.082,-341.907C522.149,-332.832 530.781,-323.121 539.094,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"541.954,-315.82 545.982,-306.021 536.722,-311.17 541.954,-315.82\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M238.5,-187C238.5,-187 95.5,-187 95.5,-187 89.5,-187 83.5,-181 83.5,-175 83.5,-175 83.5,-116 83.5,-116 83.5,-110 89.5,-104 95.5,-104 95.5,-104 238.5,-104 238.5,-104 244.5,-104 250.5,-110 250.5,-116 250.5,-116 250.5,-175 250.5,-175 250.5,-181 244.5,-187 238.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 18.067</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 170</text>\r\n",
       "<text text-anchor=\"middle\" x=\"167\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;2.884</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M302.182,-222.907C284.521,-212.925 265.497,-202.172 247.457,-191.976\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"249.119,-188.894 238.691,-187.021 245.674,-194.988 249.119,-188.894\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M469,-187C469,-187 281,-187 281,-187 275,-187 269,-181 269,-175 269,-175 269,-116 269,-116 269,-110 275,-104 281,-104 281,-104 469,-104 469,-104 475,-104 481,-110 481,-116 481,-116 481,-175 481,-175 481,-181 475,-187 469,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.029</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"375\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.315</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M374.347,-222.907C374.418,-214.649 374.493,-205.864 374.566,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"378.068,-197.05 374.654,-187.021 371.068,-196.99 378.068,-197.05\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-68C92,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 92,-0 92,-0 98,-0 104,-6 104,-12 104,-12 104,-56 104,-56 104,-62 98,-68 92,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=127</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 127/0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M124.178,-103.726C114.408,-94.423 104.031,-84.5428 94.2834,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"96.6279,-72.6606 86.9722,-68.2996 91.8008,-77.7301 96.6279,-72.6606\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 134.5,-68 134.5,-68 128.5,-68 122.5,-62 122.5,-56 122.5,-56 122.5,-12 122.5,-12 122.5,-6 128.5,-0 134.5,-0 134.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 41/2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.660</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M168.117,-103.726C168.342,-95.5175 168.579,-86.8595 168.807,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"172.312,-78.3917 169.088,-68.2996 165.315,-78.2 172.312,-78.3917\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M338.5,-68C338.5,-68 267.5,-68 267.5,-68 261.5,-68 255.5,-62 255.5,-56 255.5,-56 255.5,-12 255.5,-12 255.5,-6 261.5,-0 267.5,-0 267.5,-0 338.5,-0 338.5,-0 344.5,-0 350.5,-6 350.5,-12 350.5,-12 350.5,-56 350.5,-56 350.5,-62 344.5,-68 338.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 41/1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"303\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.739</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M348.19,-103.726C342.432,-94.9703 336.339,-85.7032 330.554,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"333.314,-74.7322 324.896,-68.2996 327.465,-78.5781 333.314,-74.7322\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M451.5,-68C451.5,-68 380.5,-68 380.5,-68 374.5,-68 368.5,-62 368.5,-56 368.5,-56 368.5,-12 368.5,-12 368.5,-6 374.5,-0 380.5,-0 380.5,-0 451.5,-0 451.5,-0 457.5,-0 463.5,-6 463.5,-12 463.5,-12 463.5,-56 463.5,-56 463.5,-62 457.5,-68 451.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 12/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"416\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.947</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M390.267,-103.726C393.443,-95.2439 396.799,-86.2819 400,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"403.303,-78.892 403.532,-68.2996 396.747,-76.4373 403.303,-78.892\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M653,-187C653,-187 511,-187 511,-187 505,-187 499,-181 499,-175 499,-175 499,-116 499,-116 499,-110 505,-104 511,-104 511,-104 653,-104 653,-104 659,-104 665,-110 665,-116 665,-116 665,-175 665,-175 665,-181 659,-187 653,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 30.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"582\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 13.736</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M582,-222.907C582,-214.649 582,-205.864 582,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"585.5,-197.021 582,-187.021 578.5,-197.021 585.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M863,-187C863,-187 695,-187 695,-187 689,-187 683,-181 683,-175 683,-175 683,-116 683,-116 683,-110 689,-104 695,-104 695,-104 863,-104 863,-104 869,-104 875,-110 875,-116 875,-116 875,-175 875,-175 875,-181 869,-187 863,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 119.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"779\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 16.290</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M650.348,-222.907C667.004,-213.016 684.932,-202.368 701.961,-192.254\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"703.962,-195.137 710.773,-187.021 700.387,-189.118 703.962,-195.137\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M574.5,-68C574.5,-68 503.5,-68 503.5,-68 497.5,-68 491.5,-62 491.5,-56 491.5,-56 491.5,-12 491.5,-12 491.5,-6 497.5,-0 503.5,-0 503.5,-0 574.5,-0 574.5,-0 580.5,-0 586.5,-6 586.5,-12 586.5,-12 586.5,-56 586.5,-56 586.5,-62 580.5,-68 574.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 39/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"539\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.565</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M565.988,-103.726C562.657,-95.2439 559.138,-86.2819 555.78,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"558.99,-76.3283 552.077,-68.2996 552.474,-78.887 558.99,-76.3283\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M691.5,-68C691.5,-68 616.5,-68 616.5,-68 610.5,-68 604.5,-62 604.5,-56 604.5,-56 604.5,-12 604.5,-12 604.5,-6 610.5,-0 616.5,-0 616.5,-0 691.5,-0 691.5,-0 697.5,-0 703.5,-6 703.5,-12 703.5,-12 703.5,-56 703.5,-56 703.5,-62 697.5,-68 691.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 5/10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.526</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M608.81,-103.726C614.568,-94.9703 620.661,-85.7032 626.446,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"629.535,-78.5781 632.104,-68.2996 623.686,-74.7322 629.535,-78.5781\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M813.5,-68C813.5,-68 738.5,-68 738.5,-68 732.5,-68 726.5,-62 726.5,-56 726.5,-56 726.5,-12 726.5,-12 726.5,-6 732.5,-0 738.5,-0 738.5,-0 813.5,-0 813.5,-0 819.5,-0 825.5,-6 825.5,-12 825.5,-12 825.5,-56 825.5,-56 825.5,-62 819.5,-68 813.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 16/27</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.468</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M777.883,-103.726C777.658,-95.5175 777.421,-86.8595 777.193,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"780.685,-78.2 776.912,-68.2996 773.688,-78.3917 780.685,-78.2\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M936,-68C936,-68 856,-68 856,-68 850,-68 844,-62 844,-56 844,-56 844,-12 844,-12 844,-6 850,-0 856,-0 856,-0 936,-0 936,-0 942,-0 948,-6 948,-12 948,-12 948,-56 948,-56 948,-62 942,-68 936,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"896\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M822.566,-103.726C832.507,-94.423 843.064,-84.5428 852.981,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"855.51,-77.6882 860.42,-68.2996 850.727,-72.5774 855.51,-77.6882\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a82472e20>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"500pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 499.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 495.5,-429 495.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M232.5,-425C232.5,-425 72.5,-425 72.5,-425 66.5,-425 60.5,-419 60.5,-413 60.5,-413 60.5,-354 60.5,-354 60.5,-348 66.5,-342 72.5,-342 72.5,-342 232.5,-342 232.5,-342 238.5,-342 244.5,-348 244.5,-354 244.5,-354 244.5,-413 244.5,-413 244.5,-419 238.5,-425 232.5,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 99.000</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 225.441</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M104.5,-298.5C104.5,-298.5 24.5,-298.5 24.5,-298.5 18.5,-298.5 12.5,-292.5 12.5,-286.5 12.5,-286.5 12.5,-242.5 12.5,-242.5 12.5,-236.5 18.5,-230.5 24.5,-230.5 24.5,-230.5 104.5,-230.5 104.5,-230.5 110.5,-230.5 116.5,-236.5 116.5,-242.5 116.5,-242.5 116.5,-286.5 116.5,-286.5 116.5,-292.5 110.5,-298.5 104.5,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 221/6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.861</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M121.969,-341.907C113.42,-330.542 104.121,-318.178 95.5435,-306.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"98.2542,-304.555 89.4461,-298.667 92.6599,-308.763 98.2542,-304.555\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M334.5,-306C334.5,-306 146.5,-306 146.5,-306 140.5,-306 134.5,-300 134.5,-294 134.5,-294 134.5,-235 134.5,-235 134.5,-229 140.5,-223 146.5,-223 146.5,-223 334.5,-223 334.5,-223 340.5,-223 346.5,-229 346.5,-235 346.5,-235 346.5,-294 346.5,-294 346.5,-300 340.5,-306 334.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.048</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"240.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 75.884</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M183.031,-341.907C189.789,-332.923 197.015,-323.315 203.984,-314.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"206.809,-316.116 210.023,-306.021 201.215,-311.909 206.809,-316.116\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M213.5,-187C213.5,-187 71.5,-187 71.5,-187 65.5,-187 59.5,-181 59.5,-175 59.5,-175 59.5,-116 59.5,-116 59.5,-110 65.5,-104 71.5,-104 71.5,-104 213.5,-104 213.5,-104 219.5,-104 225.5,-110 225.5,-116 225.5,-116 225.5,-175 225.5,-175 225.5,-181 219.5,-187 213.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 30.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 13.736</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M206.499,-222.907C198.898,-213.832 190.764,-204.121 182.931,-194.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"185.545,-192.439 176.441,-187.021 180.179,-196.934 185.545,-192.439\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M423.5,-187C423.5,-187 255.5,-187 255.5,-187 249.5,-187 243.5,-181 243.5,-175 243.5,-175 243.5,-116 243.5,-116 243.5,-110 249.5,-104 255.5,-104 255.5,-104 423.5,-104 423.5,-104 429.5,-104 435.5,-110 435.5,-116 435.5,-116 435.5,-175 435.5,-175 435.5,-181 429.5,-187 423.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 119.250</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 16.290</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M274.848,-222.907C282.526,-213.832 290.744,-204.121 298.657,-194.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"301.426,-196.916 305.213,-187.021 296.082,-192.394 301.426,-196.916\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M83,-68C83,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 83,-0 83,-0 89,-0 95,-6 95,-12 95,-12 95,-56 95,-56 95,-62 89,-68 83,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 39/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.565</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M107.126,-103.726C99.2916,-94.6966 90.9861,-85.1235 83.1416,-76.0816\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"85.5871,-73.5595 76.3901,-68.2996 80.2996,-78.1467 85.5871,-73.5595\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M200,-68C200,-68 125,-68 125,-68 119,-68 113,-62 113,-56 113,-56 113,-12 113,-12 113,-6 119,-0 125,-0 125,-0 200,-0 200,-0 206,-0 212,-6 212,-12 212,-12 212,-56 212,-56 212,-62 206,-68 200,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 5/10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"162.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.526</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M149.947,-103.726C151.463,-95.4263 153.063,-86.6671 154.594,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"158.064,-78.7658 156.418,-68.2996 151.178,-77.508 158.064,-78.7658\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M357,-68C357,-68 282,-68 282,-68 276,-68 270,-62 270,-56 270,-56 270,-12 270,-12 270,-6 276,-0 282,-0 282,-0 357,-0 357,-0 363,-0 369,-6 369,-12 369,-12 369,-56 369,-56 369,-62 363,-68 357,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 16/27</text>\r\n",
       "<text text-anchor=\"middle\" x=\"319.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.468</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M332.053,-103.726C330.537,-95.4263 328.937,-86.6671 327.406,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"330.822,-77.508 325.582,-68.2996 323.936,-78.7658 330.822,-77.508\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M479.5,-68C479.5,-68 399.5,-68 399.5,-68 393.5,-68 387.5,-62 387.5,-56 387.5,-56 387.5,-12 387.5,-12 387.5,-6 393.5,-0 399.5,-0 399.5,-0 479.5,-0 479.5,-0 485.5,-0 491.5,-6 491.5,-12 491.5,-12 491.5,-56 491.5,-56 491.5,-62 485.5,-68 479.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"439.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.939</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M376.736,-103.726C385.066,-94.6054 393.902,-84.93 402.233,-75.8078\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"404.93,-78.044 409.089,-68.2996 399.761,-73.3235 404.93,-78.044\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a82472610>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$p_0$</th>\n",
       "      <th>$l_0$</th>\n",
       "      <th>$r_0$</th>\n",
       "      <th>$\\gamma_0$</th>\n",
       "      <th>$l_1$</th>\n",
       "      <th>$p_1$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.5</td>\n",
       "      <td>-1.939394</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>0.358514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.5</td>\n",
       "      <td>-1.939394</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>0.358514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.5</td>\n",
       "      <td>-1.939394</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>0.358514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.5</td>\n",
       "      <td>-0.468085</td>\n",
       "      <td>-0.140426</td>\n",
       "      <td>0.464951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>1.861472</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.636092</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     one  y $p_0$ $l_0$ $r_0$ $\\gamma_0$     $l_1$     $p_1$\n",
       "0    1.0  0   0.5   0.0  -0.5  -1.939394 -0.581818  0.358514\n",
       "1    1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "2    1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "3    1.0  0   0.5   0.0  -0.5  -1.939394 -0.581818  0.358514\n",
       "4    1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "..   ... ..   ...   ...   ...        ...       ...       ...\n",
       "450  1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "451  1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "452  1.0  0   0.5   0.0  -0.5  -1.939394 -0.581818  0.358514\n",
       "453  1.0  0   0.5   0.0  -0.5  -0.468085 -0.140426  0.464951\n",
       "454  1.0  1   0.5   0.0   0.5   1.861472  0.558442  0.636092\n",
       "\n",
       "[455 rows x 8 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iterate(0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"951pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 950.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 946.5,-429 946.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M545,-425C545,-425 359,-425 359,-425 353,-425 347,-419 347,-413 347,-413 347,-354 347,-354 347,-348 353,-342 359,-342 359,-342 545,-342 545,-342 551,-342 557,-348 557,-354 557,-354 557,-413 557,-413 557,-419 551,-425 545,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"452\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"452\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.165</text>\r\n",
       "<text text-anchor=\"middle\" x=\"452\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"452\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"452\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 127.695</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M420.5,-306C420.5,-306 285.5,-306 285.5,-306 279.5,-306 273.5,-300 273.5,-294 273.5,-294 273.5,-235 273.5,-235 273.5,-229 279.5,-223 285.5,-223 285.5,-223 420.5,-223 420.5,-223 426.5,-223 432.5,-229 432.5,-235 432.5,-235 432.5,-294 432.5,-294 432.5,-300 426.5,-306 420.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst area &lt;= 783.600</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 341</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 55.522</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M417.652,-341.907C409.974,-332.832 401.756,-323.121 393.843,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"396.418,-311.394 387.287,-306.021 391.074,-315.916 396.418,-311.394\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M623,-306C623,-306 481,-306 481,-306 475,-306 469,-300 469,-294 469,-294 469,-235 469,-235 469,-229 475,-223 481,-223 481,-223 623,-223 623,-223 629,-223 635,-229 635,-235 635,-235 635,-294 635,-294 635,-300 629,-306 623,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 25.075</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 114</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;1.435</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M486.695,-341.907C494.451,-332.832 502.751,-323.121 510.744,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"513.53,-315.897 517.367,-306.021 508.209,-311.349 513.53,-315.897\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M239.5,-187C239.5,-187 96.5,-187 96.5,-187 90.5,-187 84.5,-181 84.5,-175 84.5,-175 84.5,-116 84.5,-116 84.5,-110 90.5,-104 96.5,-104 96.5,-104 239.5,-104 239.5,-104 245.5,-104 251.5,-110 251.5,-116 251.5,-116 251.5,-175 251.5,-175 251.5,-181 245.5,-187 239.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"168\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"168\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 20.205</text>\r\n",
       "<text text-anchor=\"middle\" x=\"168\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"168\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"168\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.435</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M288.815,-222.907C273.318,-213.106 256.647,-202.563 240.787,-192.533\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"242.394,-189.408 232.071,-187.021 238.652,-195.324 242.394,-189.408\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M424.5,-187C424.5,-187 281.5,-187 281.5,-187 275.5,-187 269.5,-181 269.5,-175 269.5,-175 269.5,-116 269.5,-116 269.5,-110 275.5,-104 281.5,-104 281.5,-104 424.5,-104 424.5,-104 430.5,-104 436.5,-110 436.5,-116 436.5,-116 436.5,-175 436.5,-175 436.5,-181 430.5,-187 424.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 16.767</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 86</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 18.926</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M353,-222.907C353,-214.649 353,-205.864 353,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"356.5,-197.021 353,-187.021 349.5,-197.021 356.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-68C92,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 92,-0 92,-0 98,-0 104,-6 104,-12 104,-12 104,-56 104,-56 104,-62 98,-68 92,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=191</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 190/1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.542</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M124.806,-103.726C114.95,-94.423 104.484,-84.5428 94.6511,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"96.9507,-72.6189 87.2763,-68.2996 92.1456,-77.7092 96.9507,-72.6189\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 134.5,-68 134.5,-68 128.5,-68 122.5,-62 122.5,-56 122.5,-56 122.5,-12 122.5,-12 122.5,-6 128.5,-0 134.5,-0 134.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 58/6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.164</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M168.745,-103.726C168.895,-95.5175 169.053,-86.8595 169.204,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"172.708,-78.3619 169.392,-68.2996 165.71,-78.234 172.708,-78.3619\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M333.5,-68C333.5,-68 262.5,-68 262.5,-68 256.5,-68 250.5,-62 250.5,-56 250.5,-56 250.5,-12 250.5,-12 250.5,-6 256.5,-0 262.5,-0 262.5,-0 333.5,-0 333.5,-0 339.5,-0 345.5,-6 345.5,-12 345.5,-12 345.5,-56 345.5,-56 345.5,-62 339.5,-68 333.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"298\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 19/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.078</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M332.52,-103.726C328.214,-95.1527 323.661,-86.0891 319.325,-77.4555\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"322.342,-75.6647 314.726,-68.2996 316.087,-78.8067 322.342,-75.6647\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M450.5,-68C450.5,-68 375.5,-68 375.5,-68 369.5,-68 363.5,-62 363.5,-56 363.5,-56 363.5,-12 363.5,-12 363.5,-6 369.5,-0 375.5,-0 375.5,-0 450.5,-0 450.5,-0 456.5,-0 462.5,-6 462.5,-12 462.5,-12 462.5,-56 462.5,-56 462.5,-62 456.5,-68 450.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"413\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"413\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"413\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 12/52</text>\r\n",
       "<text text-anchor=\"middle\" x=\"413\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.976</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M375.342,-103.726C380.09,-95.0615 385.112,-85.8962 389.888,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"393.018,-78.7513 394.754,-68.2996 386.879,-75.3875 393.018,-78.7513\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M637,-187C637,-187 467,-187 467,-187 461,-187 455,-181 455,-175 455,-175 455,-116 455,-116 455,-110 461,-104 467,-104 467,-104 637,-104 637,-104 643,-104 649,-110 649,-116 649,-116 649,-175 649,-175 649,-181 643,-187 637,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean perimeter &lt;= 102.500</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 29</text>\r\n",
       "<text text-anchor=\"middle\" x=\"552\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 0.265</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M552,-222.907C552,-214.649 552,-205.864 552,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"555.5,-197.021 552,-187.021 548.5,-197.021 555.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M877,-187C877,-187 679,-187 679,-187 673,-187 667,-181 667,-175 667,-175 667,-116 667,-116 667,-110 673,-104 679,-104 679,-104 877,-104 877,-104 883,-104 889,-110 889,-116 889,-116 889,-175 889,-175 889,-181 883,-187 877,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"778\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"778\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst fractal dimension &lt;= 0.085</text>\r\n",
       "<text text-anchor=\"middle\" x=\"778\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"778\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 85</text>\r\n",
       "<text text-anchor=\"middle\" x=\"778\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;2.013</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M630.41,-222.907C649.868,-212.834 670.84,-201.977 690.695,-191.698\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"692.458,-194.726 699.729,-187.021 689.239,-188.51 692.458,-194.726\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M575.5,-68C575.5,-68 500.5,-68 500.5,-68 494.5,-68 488.5,-62 488.5,-56 488.5,-56 488.5,-12 488.5,-12 488.5,-6 494.5,-0 500.5,-0 500.5,-0 575.5,-0 575.5,-0 581.5,-0 587.5,-6 587.5,-12 587.5,-12 587.5,-56 587.5,-56 587.5,-62 581.5,-68 575.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"538\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"538\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"538\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 2/4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"538\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.380</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M546.787,-103.726C545.726,-95.4263 544.606,-86.6671 543.534,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"546.998,-77.7749 542.257,-68.2996 540.054,-78.6628 546.998,-77.7749\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M692.5,-68C692.5,-68 617.5,-68 617.5,-68 611.5,-68 605.5,-62 605.5,-56 605.5,-56 605.5,-12 605.5,-12 605.5,-6 611.5,-0 617.5,-0 617.5,-0 692.5,-0 692.5,-0 698.5,-0 704.5,-6 704.5,-12 704.5,-12 704.5,-56 704.5,-56 704.5,-62 698.5,-68 692.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"655\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"655\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=23</text>\r\n",
       "<text text-anchor=\"middle\" x=\"655\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/23</text>\r\n",
       "<text text-anchor=\"middle\" x=\"655\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.311</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M590.353,-103.726C598.933,-94.6054 608.034,-84.93 616.615,-75.8078\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"619.375,-77.9816 623.677,-68.2996 614.276,-73.1855 619.375,-77.9816\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M813.5,-68C813.5,-68 738.5,-68 738.5,-68 732.5,-68 726.5,-62 726.5,-56 726.5,-56 726.5,-12 726.5,-12 726.5,-6 732.5,-0 738.5,-0 738.5,-0 813.5,-0 813.5,-0 819.5,-0 825.5,-6 825.5,-12 825.5,-12 825.5,-56 825.5,-56 825.5,-62 819.5,-68 813.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=21</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/21</text>\r\n",
       "<text text-anchor=\"middle\" x=\"776\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.291</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M777.255,-103.726C777.105,-95.5175 776.947,-86.8595 776.796,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"780.29,-78.234 776.608,-68.2996 773.292,-78.3619 780.29,-78.234\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M930.5,-68C930.5,-68 855.5,-68 855.5,-68 849.5,-68 843.5,-62 843.5,-56 843.5,-56 843.5,-12 843.5,-12 843.5,-6 849.5,-0 855.5,-0 855.5,-0 930.5,-0 930.5,-0 936.5,-0 942.5,-6 942.5,-12 942.5,-12 942.5,-56 942.5,-56 942.5,-62 936.5,-68 930.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"893\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"893\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"893\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"893\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.559</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M820.822,-103.726C830.592,-94.423 840.969,-84.5428 850.717,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"853.199,-77.7301 858.028,-68.2996 848.372,-72.6606 853.199,-77.7301\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5ccdf0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"339pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 339.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 335,-429 335,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M297,-425C297,-425 111,-425 111,-425 105,-425 99,-419 99,-413 99,-413 99,-354 99,-354 99,-348 105,-342 111,-342 111,-342 297,-342 297,-342 303,-342 309,-348 309,-354 309,-354 309,-413 309,-413 309,-419 303,-425 297,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.165</text>\r\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 127.695</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M196.5,-306C196.5,-306 61.5,-306 61.5,-306 55.5,-306 49.5,-300 49.5,-294 49.5,-294 49.5,-235 49.5,-235 49.5,-229 55.5,-223 61.5,-223 61.5,-223 196.5,-223 196.5,-223 202.5,-223 208.5,-229 208.5,-235 208.5,-235 208.5,-294 208.5,-294 208.5,-300 202.5,-306 196.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst area &lt;= 783.600</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 341</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 55.522</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M177.979,-341.907C172.336,-333.105 166.31,-323.703 160.482,-314.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"163.318,-312.551 154.975,-306.021 157.425,-316.328 163.318,-312.551\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M319,-298.5C319,-298.5 239,-298.5 239,-298.5 233,-298.5 227,-292.5 227,-286.5 227,-286.5 227,-242.5 227,-242.5 227,-236.5 233,-230.5 239,-230.5 239,-230.5 319,-230.5 319,-230.5 325,-230.5 331,-236.5 331,-242.5 331,-242.5 331,-286.5 331,-286.5 331,-292.5 325,-298.5 319,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"279\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"279\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=114</text>\r\n",
       "<text text-anchor=\"middle\" x=\"279\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 2/112</text>\r\n",
       "<text text-anchor=\"middle\" x=\"279\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.512</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M230.021,-341.907C237.236,-330.652 245.078,-318.418 252.329,-307.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"255.289,-308.975 257.739,-298.667 249.396,-305.197 255.289,-308.975\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-179.5C92,-179.5 12,-179.5 12,-179.5 6,-179.5 0,-173.5 0,-167.5 0,-167.5 0,-123.5 0,-123.5 0,-117.5 6,-111.5 12,-111.5 12,-111.5 92,-111.5 92,-111.5 98,-111.5 104,-117.5 104,-123.5 104,-123.5 104,-167.5 104,-167.5 104,-173.5 98,-179.5 92,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 248/7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.468</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M102.285,-222.907C94.878,-211.652 86.8266,-199.418 79.3819,-188.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"82.249,-186.096 73.8278,-179.667 76.4017,-189.944 82.249,-186.096\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M277.5,-187C277.5,-187 134.5,-187 134.5,-187 128.5,-187 122.5,-181 122.5,-175 122.5,-175 122.5,-116 122.5,-116 122.5,-110 128.5,-104 134.5,-104 134.5,-104 277.5,-104 277.5,-104 283.5,-104 289.5,-110 289.5,-116 289.5,-116 289.5,-175 289.5,-175 289.5,-181 283.5,-187 277.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 16.767</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 86</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 18.926</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M155.715,-222.907C161.508,-214.105 167.695,-204.703 173.678,-195.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"176.759,-197.298 179.332,-187.021 170.911,-193.45 176.759,-197.298\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M183.5,-68C183.5,-68 112.5,-68 112.5,-68 106.5,-68 100.5,-62 100.5,-56 100.5,-56 100.5,-12 100.5,-12 100.5,-6 106.5,-0 112.5,-0 112.5,-0 183.5,-0 183.5,-0 189.5,-0 195.5,-6 195.5,-12 195.5,-12 195.5,-56 195.5,-56 195.5,-62 189.5,-68 183.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 19/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.078</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M184.403,-103.726C179.813,-95.0615 174.959,-85.8962 170.342,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"173.412,-75.4982 165.638,-68.2996 167.226,-78.7748 173.412,-75.4982\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M300.5,-68C300.5,-68 225.5,-68 225.5,-68 219.5,-68 213.5,-62 213.5,-56 213.5,-56 213.5,-12 213.5,-12 213.5,-6 219.5,-0 225.5,-0 225.5,-0 300.5,-0 300.5,-0 306.5,-0 312.5,-6 312.5,-12 312.5,-12 312.5,-56 312.5,-56 312.5,-62 306.5,-68 300.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 12/52</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.976</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M227.225,-103.726C231.735,-95.0615 236.506,-85.8962 241.043,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"244.153,-78.7859 245.666,-68.2996 237.944,-75.5537 244.153,-78.7859\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5cc760>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$p_1$</th>\n",
       "      <th>$l_1$</th>\n",
       "      <th>$r_1$</th>\n",
       "      <th>$\\gamma_1$</th>\n",
       "      <th>$l_2$</th>\n",
       "      <th>$p_2$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.358514</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>-0.358514</td>\n",
       "      <td>-1.511592</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>0.262059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.358514</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>-0.358514</td>\n",
       "      <td>-1.511592</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>0.262059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.358514</td>\n",
       "      <td>-0.581818</td>\n",
       "      <td>-0.358514</td>\n",
       "      <td>-1.511592</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>0.262059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.464951</td>\n",
       "      <td>-0.140426</td>\n",
       "      <td>-0.464951</td>\n",
       "      <td>-0.975950</td>\n",
       "      <td>-0.433210</td>\n",
       "      <td>0.393360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.636092</td>\n",
       "      <td>0.558442</td>\n",
       "      <td>0.363908</td>\n",
       "      <td>1.467552</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.730804</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     one  y     $p_1$     $l_1$     $r_1$ $\\gamma_1$     $l_2$     $p_2$\n",
       "0    1.0  0  0.358514 -0.581818 -0.358514  -1.511592 -1.035296  0.262059\n",
       "1    1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "2    1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "3    1.0  0  0.358514 -0.581818 -0.358514  -1.511592 -1.035296  0.262059\n",
       "4    1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "..   ... ..       ...       ...       ...        ...       ...       ...\n",
       "450  1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "451  1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "452  1.0  0  0.358514 -0.581818 -0.358514  -1.511592 -1.035296  0.262059\n",
       "453  1.0  0  0.464951 -0.140426 -0.464951  -0.975950 -0.433210  0.393360\n",
       "454  1.0  1  0.636092  0.558442  0.363908   1.467552  0.998707  0.730804\n",
       "\n",
       "[455 rows x 8 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iterate(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In iteration 1, we firstly train a tree using residuals_1. This tree tells us height is also important in determining weight. Whose who are less than 1.55 meters are supported to lose -7.289 and the other to gain 7.289. Again, we want to shrink this to 20%, which is -1.4578 and 1.4578. We then make prediction_2 based on prediction_1 and $\\gamma$. We see Alex gains 1.4578 kg because he is 1.6. Others also gain or lose weight because of the new rule."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"924pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 923.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 919.5,-429 919.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M534,-425C534,-425 366,-425 366,-425 360,-425 354,-419 354,-413 354,-413 354,-354 354,-354 354,-348 360,-342 366,-342 366,-342 534,-342 534,-342 540,-342 546,-348 546,-354 546,-354 546,-413 546,-413 546,-419 540,-425 534,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"450\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 127.100</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 80.860</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M440,-306C440,-306 254,-306 254,-306 248,-306 242,-300 242,-294 242,-294 242,-235 242,-235 242,-229 248,-223 254,-223 254,-223 440,-223 440,-223 446,-223 452,-229 452,-235 452,-235 452,-294 452,-294 452,-300 446,-306 440,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.118</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 340</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 32.354</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M414.265,-341.907C406.275,-332.832 397.726,-323.121 389.494,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"391.907,-311.214 382.672,-306.021 386.653,-315.839 391.907,-311.214\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M625.5,-306C625.5,-306 482.5,-306 482.5,-306 476.5,-306 470.5,-300 470.5,-294 470.5,-294 470.5,-235 470.5,-235 470.5,-229 476.5,-223 482.5,-223 482.5,-223 625.5,-223 625.5,-223 631.5,-223 637.5,-229 637.5,-235 637.5,-235 637.5,-294 637.5,-294 637.5,-300 631.5,-306 625.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 19.205</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 115</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;1.402</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M486.082,-341.907C494.149,-332.832 502.781,-323.121 511.094,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"513.954,-315.82 517.982,-306.021 508.722,-311.17 513.954,-315.82\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M232.5,-187C232.5,-187 107.5,-187 107.5,-187 101.5,-187 95.5,-181 95.5,-175 95.5,-175 95.5,-116 95.5,-116 95.5,-110 101.5,-104 107.5,-104 107.5,-104 232.5,-104 232.5,-104 238.5,-104 244.5,-110 244.5,-116 244.5,-116 244.5,-175 244.5,-175 244.5,-181 238.5,-187 232.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">radius error &lt;= 0.343</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 0.471</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M285.591,-222.907C270.901,-213.197 255.109,-202.758 240.061,-192.811\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"241.573,-189.615 231.301,-187.021 237.713,-195.455 241.573,-189.615\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M418.5,-187C418.5,-187 275.5,-187 275.5,-187 269.5,-187 263.5,-181 263.5,-175 263.5,-175 263.5,-116 263.5,-116 263.5,-110 269.5,-104 275.5,-104 275.5,-104 418.5,-104 418.5,-104 424.5,-104 430.5,-110 430.5,-116 430.5,-116 430.5,-175 430.5,-175 430.5,-181 424.5,-187 418.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 19.220</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 85</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 10.184</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M347,-222.907C347,-214.649 347,-205.864 347,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"350.5,-197.021 347,-187.021 343.5,-197.021 350.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-68C92,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 92,-0 92,-0 98,-0 104,-6 104,-12 104,-12 104,-56 104,-56 104,-62 98,-68 92,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=191</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 188/3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.317</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M126.061,-103.726C116.036,-94.423 105.389,-84.5428 95.3864,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"97.5954,-72.5362 87.8845,-68.2996 92.8339,-77.6673 97.5954,-72.5362\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 134.5,-68 134.5,-68 128.5,-68 122.5,-62 122.5,-56 122.5,-56 122.5,-12 122.5,-12 122.5,-6 128.5,-0 134.5,-0 134.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 56/8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.885</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M170,-103.726C170,-95.5175 170,-86.8595 170,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"173.5,-78.2996 170,-68.2996 166.5,-78.2996 173.5,-78.2996\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M318.5,-68C318.5,-68 247.5,-68 247.5,-68 241.5,-68 235.5,-62 235.5,-56 235.5,-56 235.5,-12 235.5,-12 235.5,-6 241.5,-0 247.5,-0 247.5,-0 318.5,-0 318.5,-0 324.5,-0 330.5,-6 330.5,-12 330.5,-12 330.5,-56 330.5,-56 330.5,-62 324.5,-68 318.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"283\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"283\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"283\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 28/14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"283\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.444</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M323.169,-103.726C318.104,-95.0615 312.748,-85.8962 307.653,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"310.531,-75.167 302.463,-68.2996 304.487,-78.6992 310.531,-75.167\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M435.5,-68C435.5,-68 360.5,-68 360.5,-68 354.5,-68 348.5,-62 348.5,-56 348.5,-56 348.5,-12 348.5,-12 348.5,-6 354.5,-0 360.5,-0 360.5,-0 435.5,-0 435.5,-0 441.5,-0 447.5,-6 447.5,-12 447.5,-12 447.5,-56 447.5,-56 447.5,-62 441.5,-68 435.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"398\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"398\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"398\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 8/35</text>\r\n",
       "<text text-anchor=\"middle\" x=\"398\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.963</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M365.991,-103.726C369.984,-95.1527 374.205,-86.0891 378.226,-77.4555\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"381.441,-78.8423 382.491,-68.2996 375.096,-75.8869 381.441,-78.8423\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M630,-187C630,-187 478,-187 478,-187 472,-187 466,-181 466,-175 466,-175 466,-116 466,-116 466,-110 472,-104 478,-104 478,-104 630,-104 630,-104 636,-104 642,-110 642,-116 642,-116 642,-175 642,-175 642,-181 636,-187 630,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst symmetry &lt;= 0.275</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 29</text>\r\n",
       "<text text-anchor=\"middle\" x=\"554\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.457</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M554,-222.907C554,-214.649 554,-205.864 554,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"557.5,-197.021 554,-187.021 550.5,-197.021 557.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M824.5,-187C824.5,-187 673.5,-187 673.5,-187 667.5,-187 661.5,-181 661.5,-175 661.5,-175 661.5,-116 661.5,-116 661.5,-110 667.5,-104 673.5,-104 673.5,-104 824.5,-104 824.5,-104 830.5,-104 836.5,-110 836.5,-116 836.5,-116 836.5,-175 836.5,-175 836.5,-181 830.5,-187 824.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concavity &lt;= 0.218</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 86</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;1.477</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M621.654,-222.907C638.141,-213.016 655.887,-202.368 672.743,-192.254\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"674.691,-195.167 681.465,-187.021 671.09,-189.165 674.691,-195.167\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M552.5,-68C552.5,-68 477.5,-68 477.5,-68 471.5,-68 465.5,-62 465.5,-56 465.5,-56 465.5,-12 465.5,-12 465.5,-6 471.5,-0 477.5,-0 477.5,-0 552.5,-0 552.5,-0 558.5,-0 564.5,-6 564.5,-12 564.5,-12 564.5,-56 564.5,-56 564.5,-62 558.5,-68 552.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"515\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"515\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"515\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 1/6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"515\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.541</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M539.478,-103.726C536.457,-95.2439 533.265,-86.2819 530.219,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"533.513,-76.5456 526.86,-68.2996 526.918,-78.8943 533.513,-76.5456\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M669.5,-68C669.5,-68 594.5,-68 594.5,-68 588.5,-68 582.5,-62 582.5,-56 582.5,-56 582.5,-12 582.5,-12 582.5,-6 588.5,-0 594.5,-0 594.5,-0 669.5,-0 669.5,-0 675.5,-0 681.5,-6 681.5,-12 681.5,-12 681.5,-56 681.5,-56 681.5,-62 675.5,-68 669.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"632\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"632\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"632\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"632\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.137</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M583.044,-103.726C589.346,-94.879 596.02,-85.51 602.346,-76.6303\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"605.329,-78.4751 608.28,-68.2996 599.627,-74.4138 605.329,-78.4751\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M786.5,-68C786.5,-68 711.5,-68 711.5,-68 705.5,-68 699.5,-62 699.5,-56 699.5,-56 699.5,-12 699.5,-12 699.5,-6 705.5,-0 711.5,-0 711.5,-0 786.5,-0 786.5,-0 792.5,-0 798.5,-6 798.5,-12 798.5,-12 798.5,-56 798.5,-56 798.5,-62 792.5,-68 786.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"749\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.300</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M749,-103.726C749,-95.5175 749,-86.8595 749,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"752.5,-78.2996 749,-68.2996 745.5,-78.2996 752.5,-78.2996\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M903.5,-68C903.5,-68 828.5,-68 828.5,-68 822.5,-68 816.5,-62 816.5,-56 816.5,-56 816.5,-12 816.5,-12 816.5,-6 822.5,-0 828.5,-0 828.5,-0 903.5,-0 903.5,-0 909.5,-0 915.5,-6 915.5,-12 915.5,-12 915.5,-56 915.5,-56 915.5,-62 909.5,-68 903.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"866\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"866\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"866\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"866\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.097</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M792.566,-103.726C802.507,-94.423 813.064,-84.5428 822.981,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"825.51,-77.6882 830.42,-68.2996 820.727,-72.5774 825.51,-77.6882\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5cca00>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"364pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 364.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 360,-429 360,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M300,-425C300,-425 132,-425 132,-425 126,-425 120,-419 120,-413 120,-413 120,-354 120,-354 120,-348 126,-342 132,-342 132,-342 300,-342 300,-342 306,-342 312,-348 312,-354 312,-354 312,-413 312,-413 312,-419 306,-425 300,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"216\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"216\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst perimeter &lt;= 127.100</text>\r\n",
       "<text text-anchor=\"middle\" x=\"216\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"216\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"216\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 80.860</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M222,-306C222,-306 36,-306 36,-306 30,-306 24,-300 24,-294 24,-294 24,-235 24,-235 24,-229 30,-223 36,-223 36,-223 222,-223 222,-223 228,-223 234,-229 234,-235 234,-235 234,-294 234,-294 234,-300 228,-306 222,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.118</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 340</text>\r\n",
       "<text text-anchor=\"middle\" x=\"129\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 32.354</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M185.816,-341.907C179.135,-332.923 171.991,-323.315 165.101,-314.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"167.907,-311.957 159.131,-306.021 162.289,-316.134 167.907,-311.957\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M344,-298.5C344,-298.5 264,-298.5 264,-298.5 258,-298.5 252,-292.5 252,-286.5 252,-286.5 252,-242.5 252,-242.5 252,-236.5 258,-230.5 264,-230.5 264,-230.5 344,-230.5 344,-230.5 350,-230.5 356,-236.5 356,-242.5 356,-242.5 356,-286.5 356,-286.5 356,-292.5 350,-298.5 344,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=115</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 1/114</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.306</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M246.531,-341.907C255.08,-330.542 264.379,-318.178 272.956,-306.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"275.84,-308.763 279.054,-298.667 270.246,-304.555 275.84,-308.763\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-179.5C92,-179.5 12,-179.5 12,-179.5 6,-179.5 0,-173.5 0,-167.5 0,-167.5 0,-123.5 0,-123.5 0,-117.5 6,-111.5 12,-111.5 12,-111.5 92,-111.5 92,-111.5 98,-111.5 104,-117.5 104,-123.5 104,-123.5 104,-167.5 104,-167.5 104,-173.5 98,-179.5 92,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 244/11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.225</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M102.285,-222.907C94.878,-211.652 86.8266,-199.418 79.3819,-188.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"82.249,-186.096 73.8278,-179.667 76.4017,-189.944 82.249,-186.096\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M277.5,-187C277.5,-187 134.5,-187 134.5,-187 128.5,-187 122.5,-181 122.5,-175 122.5,-175 122.5,-116 122.5,-116 122.5,-110 128.5,-104 134.5,-104 134.5,-104 277.5,-104 277.5,-104 283.5,-104 289.5,-110 289.5,-116 289.5,-116 289.5,-175 289.5,-175 289.5,-181 283.5,-187 277.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 19.220</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 85</text>\r\n",
       "<text text-anchor=\"middle\" x=\"206\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 10.184</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M155.715,-222.907C161.508,-214.105 167.695,-204.703 173.678,-195.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"176.759,-197.298 179.332,-187.021 170.911,-193.45 176.759,-197.298\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M183.5,-68C183.5,-68 112.5,-68 112.5,-68 106.5,-68 100.5,-62 100.5,-56 100.5,-56 100.5,-12 100.5,-12 100.5,-6 106.5,-0 112.5,-0 112.5,-0 183.5,-0 183.5,-0 189.5,-0 195.5,-6 195.5,-12 195.5,-12 195.5,-56 195.5,-56 195.5,-62 189.5,-68 183.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 28/14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"148\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.444</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M184.403,-103.726C179.813,-95.0615 174.959,-85.8962 170.342,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"173.412,-75.4982 165.638,-68.2996 167.226,-78.7748 173.412,-75.4982\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M300.5,-68C300.5,-68 225.5,-68 225.5,-68 219.5,-68 213.5,-62 213.5,-56 213.5,-56 213.5,-12 213.5,-12 213.5,-6 219.5,-0 225.5,-0 225.5,-0 300.5,-0 300.5,-0 306.5,-0 312.5,-6 312.5,-12 312.5,-12 312.5,-56 312.5,-56 312.5,-62 306.5,-68 300.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 8/35</text>\r\n",
       "<text text-anchor=\"middle\" x=\"263\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.963</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M227.225,-103.726C231.735,-95.0615 236.506,-85.8962 241.043,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"244.153,-78.7859 245.666,-68.2996 237.944,-75.5537 244.153,-78.7859\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5ccbb0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$p_2$</th>\n",
       "      <th>$l_2$</th>\n",
       "      <th>$r_2$</th>\n",
       "      <th>$\\gamma_2$</th>\n",
       "      <th>$l_3$</th>\n",
       "      <th>$p_3$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.262059</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>-0.262059</td>\n",
       "      <td>-1.306233</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>0.193541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.262059</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>-0.262059</td>\n",
       "      <td>-1.306233</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>0.193541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.262059</td>\n",
       "      <td>-1.035296</td>\n",
       "      <td>-0.262059</td>\n",
       "      <td>-1.306233</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>0.193541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.393360</td>\n",
       "      <td>-0.433210</td>\n",
       "      <td>-0.393360</td>\n",
       "      <td>-0.963380</td>\n",
       "      <td>-0.722224</td>\n",
       "      <td>0.326903</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.730804</td>\n",
       "      <td>0.998707</td>\n",
       "      <td>0.269196</td>\n",
       "      <td>1.225045</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.796769</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     one  y     $p_2$     $l_2$     $r_2$ $\\gamma_2$     $l_3$     $p_3$\n",
       "0    1.0  0  0.262059 -1.035296 -0.262059  -1.306233 -1.427166  0.193541\n",
       "1    1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "2    1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "3    1.0  0  0.262059 -1.035296 -0.262059  -1.306233 -1.427166  0.193541\n",
       "4    1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "..   ... ..       ...       ...       ...        ...       ...       ...\n",
       "450  1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "451  1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "452  1.0  0  0.262059 -1.035296 -0.262059  -1.306233 -1.427166  0.193541\n",
       "453  1.0  0  0.393360 -0.433210 -0.393360  -0.963380 -0.722224  0.326903\n",
       "454  1.0  1  0.730804  0.998707  0.269196   1.225045  1.366221  0.796769\n",
       "\n",
       "[455 rows x 8 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iterate(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Iteration 2 again tells us that gender matters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"959pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 958.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 954.5,-429 954.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M541,-425C541,-425 355,-425 355,-425 349,-425 343,-419 343,-413 343,-413 343,-354 343,-354 343,-348 349,-342 355,-342 355,-342 541,-342 541,-342 547,-342 553,-348 553,-354 553,-354 553,-413 553,-413 553,-419 547,-425 541,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"448\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"448\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.165</text>\r\n",
       "<text text-anchor=\"middle\" x=\"448\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"448\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"448\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 54.150</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M413.5,-306C413.5,-306 278.5,-306 278.5,-306 272.5,-306 266.5,-300 266.5,-294 266.5,-294 266.5,-235 266.5,-235 266.5,-229 272.5,-223 278.5,-223 278.5,-223 413.5,-223 413.5,-223 419.5,-223 425.5,-229 425.5,-235 425.5,-235 425.5,-294 425.5,-294 425.5,-300 419.5,-306 413.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst area &lt;= 783.600</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 341</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 25.849</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M412.612,-341.907C404.7,-332.832 396.234,-323.121 388.081,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"390.535,-311.259 381.326,-306.021 385.259,-315.859 390.535,-311.259\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M622,-306C622,-306 480,-306 480,-306 474,-306 468,-300 468,-294 468,-294 468,-235 468,-235 468,-229 474,-223 480,-223 480,-223 622,-223 622,-223 628,-223 634,-229 634,-235 634,-235 634,-294 634,-294 634,-300 628,-306 622,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 25.075</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 114</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.713</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M483.735,-341.907C491.725,-332.832 500.274,-323.121 508.506,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"511.347,-315.839 515.328,-306.021 506.093,-311.214 511.347,-315.839\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M235.5,-187C235.5,-187 92.5,-187 92.5,-187 86.5,-187 80.5,-181 80.5,-175 80.5,-175 80.5,-116 80.5,-116 80.5,-110 86.5,-104 92.5,-104 92.5,-104 235.5,-104 235.5,-104 241.5,-104 247.5,-110 247.5,-116 247.5,-116 247.5,-175 247.5,-175 247.5,-181 241.5,-187 235.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"164\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"164\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 20.205</text>\r\n",
       "<text text-anchor=\"middle\" x=\"164\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"164\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"164\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 0.692</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M282.856,-222.907C267.61,-213.106 251.209,-202.563 235.606,-192.533\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"237.337,-189.484 227.032,-187.021 233.552,-195.373 237.337,-189.484\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M414.5,-187C414.5,-187 277.5,-187 277.5,-187 271.5,-187 265.5,-181 265.5,-175 265.5,-175 265.5,-116 265.5,-116 265.5,-110 271.5,-104 277.5,-104 277.5,-104 414.5,-104 414.5,-104 420.5,-104 426.5,-110 426.5,-116 426.5,-116 426.5,-175 426.5,-175 426.5,-181 420.5,-187 414.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst radius &lt;= 17.750</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 86</text>\r\n",
       "<text text-anchor=\"middle\" x=\"346\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 10.333</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M346,-222.907C346,-214.649 346,-205.864 346,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"349.5,-197.021 346,-187.021 342.5,-197.021 349.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-68C92,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 92,-0 92,-0 98,-0 104,-6 104,-12 104,-12 104,-56 104,-56 104,-62 98,-68 92,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=191</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 190/1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.216</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M122.295,-103.726C112.873,-94.5142 102.872,-84.7364 93.4598,-75.5343\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"95.6571,-72.7878 86.0599,-68.2996 90.7635,-77.7931 95.6571,-72.7878\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 134.5,-68 134.5,-68 128.5,-68 122.5,-62 122.5,-56 122.5,-56 122.5,-12 122.5,-12 122.5,-6 128.5,-0 134.5,-0 134.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 58/6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"170\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.753</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M166.234,-103.726C166.684,-95.5175 167.158,-86.8595 167.613,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"171.123,-78.4761 168.175,-68.2996 164.133,-78.0931 171.123,-78.4761\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M339.5,-68C339.5,-68 268.5,-68 268.5,-68 262.5,-68 256.5,-62 256.5,-56 256.5,-56 256.5,-12 256.5,-12 256.5,-6 262.5,-0 268.5,-0 268.5,-0 339.5,-0 339.5,-0 345.5,-0 351.5,-6 351.5,-12 351.5,-12 351.5,-56 351.5,-56 351.5,-62 345.5,-68 339.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 28/15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"304\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.395</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M330.361,-103.726C327.107,-95.2439 323.67,-86.2819 320.39,-77.7312\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"323.622,-76.3829 316.772,-68.2996 317.086,-78.8898 323.622,-76.3829\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M456.5,-68C456.5,-68 381.5,-68 381.5,-68 375.5,-68 369.5,-62 369.5,-56 369.5,-56 369.5,-12 369.5,-12 369.5,-6 375.5,-0 381.5,-0 381.5,-0 456.5,-0 456.5,-0 462.5,-0 468.5,-6 468.5,-12 468.5,-12 468.5,-56 468.5,-56 468.5,-62 462.5,-68 456.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"419\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"419\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"419\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 3/40</text>\r\n",
       "<text text-anchor=\"middle\" x=\"419\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.064</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M373.183,-103.726C379.081,-94.879 385.327,-85.51 391.246,-76.6303\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"394.165,-78.5616 396.8,-68.2996 388.341,-74.6787 394.165,-78.5616\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M645,-187C645,-187 457,-187 457,-187 451,-187 445,-181 445,-175 445,-175 445,-116 445,-116 445,-110 451,-104 457,-104 457,-104 645,-104 645,-104 651,-104 657,-110 657,-116 657,-116 657,-175 657,-175 657,-181 651,-187 645,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.086</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 29</text>\r\n",
       "<text text-anchor=\"middle\" x=\"551\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 0.588</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M551,-222.907C551,-214.649 551,-205.864 551,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"554.5,-197.021 551,-187.021 547.5,-197.021 554.5,-197.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M887,-187C887,-187 687,-187 687,-187 681,-187 675,-181 675,-175 675,-175 675,-116 675,-116 675,-110 681,-104 687,-104 687,-104 887,-104 887,-104 893,-104 899,-110 899,-116 899,-116 899,-175 899,-175 899,-181 893,-187 887,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"787\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"787\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean fractal dimension &lt;= 0.060</text>\r\n",
       "<text text-anchor=\"middle\" x=\"787\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"787\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 85</text>\r\n",
       "<text text-anchor=\"middle\" x=\"787\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;1.177</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M632.879,-222.907C653.289,-212.789 675.296,-201.879 696.112,-191.559\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"697.861,-194.598 705.266,-187.021 694.752,-188.327 697.861,-194.598\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M583.5,-68C583.5,-68 508.5,-68 508.5,-68 502.5,-68 496.5,-62 496.5,-56 496.5,-56 496.5,-12 496.5,-12 496.5,-6 502.5,-0 508.5,-0 508.5,-0 583.5,-0 583.5,-0 589.5,-0 595.5,-6 595.5,-12 595.5,-12 595.5,-56 595.5,-56 595.5,-62 589.5,-68 583.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"546\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"546\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"546\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 2/5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"546\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.156</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M549.138,-103.726C548.763,-95.5175 548.368,-86.8595 547.989,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"551.473,-78.1295 547.521,-68.2996 544.48,-78.4489 551.473,-78.1295\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M700.5,-68C700.5,-68 625.5,-68 625.5,-68 619.5,-68 613.5,-62 613.5,-56 613.5,-56 613.5,-12 613.5,-12 613.5,-6 619.5,-0 625.5,-0 625.5,-0 700.5,-0 700.5,-0 706.5,-0 712.5,-6 712.5,-12 712.5,-12 712.5,-56 712.5,-56 712.5,-62 706.5,-68 700.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"663\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"663\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"663\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/22</text>\r\n",
       "<text text-anchor=\"middle\" x=\"663\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.029</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M592.705,-103.726C602.127,-94.5142 612.128,-84.7364 621.54,-75.5343\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"624.236,-77.7931 628.94,-68.2996 619.343,-72.7878 624.236,-77.7931\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M821.5,-68C821.5,-68 746.5,-68 746.5,-68 740.5,-68 734.5,-62 734.5,-56 734.5,-56 734.5,-12 734.5,-12 734.5,-6 740.5,-0 746.5,-0 746.5,-0 821.5,-0 821.5,-0 827.5,-0 833.5,-6 833.5,-12 833.5,-12 833.5,-56 833.5,-56 833.5,-62 827.5,-68 821.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"784\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"784\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=21</text>\r\n",
       "<text text-anchor=\"middle\" x=\"784\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/21</text>\r\n",
       "<text text-anchor=\"middle\" x=\"784\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.950</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M785.883,-103.726C785.658,-95.5175 785.421,-86.8595 785.193,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"788.685,-78.2 784.912,-68.2996 781.688,-78.3917 788.685,-78.2\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M938.5,-68C938.5,-68 863.5,-68 863.5,-68 857.5,-68 851.5,-62 851.5,-56 851.5,-56 851.5,-12 851.5,-12 851.5,-6 857.5,-0 863.5,-0 863.5,-0 938.5,-0 938.5,-0 944.5,-0 950.5,-6 950.5,-12 950.5,-12 950.5,-56 950.5,-56 950.5,-62 944.5,-68 938.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"901\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"901\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"901\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 0/64</text>\r\n",
       "<text text-anchor=\"middle\" x=\"901\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.222</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M829.449,-103.726C839.135,-94.423 849.421,-84.5428 859.084,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"861.544,-77.7511 866.332,-68.2996 856.695,-72.7027 861.544,-77.7511\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5ccbb0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"337pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 337.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 333,-429 333,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M295,-425C295,-425 109,-425 109,-425 103,-425 97,-419 97,-413 97,-413 97,-354 97,-354 97,-348 103,-342 109,-342 109,-342 295,-342 295,-342 301,-342 307,-348 307,-354 307,-354 307,-413 307,-413 307,-419 301,-425 295,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"202\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"202\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.165</text>\r\n",
       "<text text-anchor=\"middle\" x=\"202\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"202\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"202\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 54.150</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M194.5,-306C194.5,-306 59.5,-306 59.5,-306 53.5,-306 47.5,-300 47.5,-294 47.5,-294 47.5,-235 47.5,-235 47.5,-229 53.5,-223 59.5,-223 59.5,-223 194.5,-223 194.5,-223 200.5,-223 206.5,-229 206.5,-235 206.5,-235 206.5,-294 206.5,-294 206.5,-300 200.5,-306 194.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"127\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"127\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst area &lt;= 783.600</text>\r\n",
       "<text text-anchor=\"middle\" x=\"127\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"127\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 341</text>\r\n",
       "<text text-anchor=\"middle\" x=\"127\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 25.849</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M175.979,-341.907C170.336,-333.105 164.31,-323.703 158.482,-314.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"161.318,-312.551 152.975,-306.021 155.425,-316.328 161.318,-312.551\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M317,-298.5C317,-298.5 237,-298.5 237,-298.5 231,-298.5 225,-292.5 225,-286.5 225,-286.5 225,-242.5 225,-242.5 225,-236.5 231,-230.5 237,-230.5 237,-230.5 317,-230.5 317,-230.5 323,-230.5 329,-236.5 329,-242.5 329,-242.5 329,-286.5 329,-286.5 329,-292.5 323,-298.5 317,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"277\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"277\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=114</text>\r\n",
       "<text text-anchor=\"middle\" x=\"277\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 2/112</text>\r\n",
       "<text text-anchor=\"middle\" x=\"277\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.174</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M228.021,-341.907C235.236,-330.652 243.078,-318.418 250.329,-307.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"253.289,-308.975 255.739,-298.667 247.396,-305.197 253.289,-308.975\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-179.5C92,-179.5 12,-179.5 12,-179.5 6,-179.5 0,-173.5 0,-167.5 0,-167.5 0,-123.5 0,-123.5 0,-117.5 6,-111.5 12,-111.5 12,-111.5 92,-111.5 92,-111.5 98,-111.5 104,-117.5 104,-123.5 104,-123.5 104,-167.5 104,-167.5 104,-173.5 98,-179.5 92,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=255</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 248/7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.116</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M100.979,-222.907C93.7643,-211.652 85.922,-199.418 78.6706,-188.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"81.6041,-186.197 73.2609,-179.667 75.711,-189.975 81.6041,-186.197\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M271.5,-187C271.5,-187 134.5,-187 134.5,-187 128.5,-187 122.5,-181 122.5,-175 122.5,-175 122.5,-116 122.5,-116 122.5,-110 128.5,-104 134.5,-104 134.5,-104 271.5,-104 271.5,-104 277.5,-104 283.5,-110 283.5,-116 283.5,-116 283.5,-175 283.5,-175 283.5,-181 277.5,-187 271.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"203\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"203\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst radius &lt;= 17.750</text>\r\n",
       "<text text-anchor=\"middle\" x=\"203\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"203\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 86</text>\r\n",
       "<text text-anchor=\"middle\" x=\"203\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 10.333</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M153.368,-222.907C159.086,-214.105 165.193,-204.703 171.098,-195.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"174.167,-197.313 176.679,-187.021 168.296,-193.5 174.167,-197.313\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M180.5,-68C180.5,-68 109.5,-68 109.5,-68 103.5,-68 97.5,-62 97.5,-56 97.5,-56 97.5,-12 97.5,-12 97.5,-6 103.5,-0 109.5,-0 109.5,-0 180.5,-0 180.5,-0 186.5,-0 192.5,-6 192.5,-12 192.5,-12 192.5,-56 192.5,-56 192.5,-62 186.5,-68 180.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 28/15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.395</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M181.403,-103.726C176.813,-95.0615 171.959,-85.8962 167.342,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"170.412,-75.4982 162.638,-68.2996 164.226,-78.7748 170.412,-75.4982\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M297.5,-68C297.5,-68 222.5,-68 222.5,-68 216.5,-68 210.5,-62 210.5,-56 210.5,-56 210.5,-12 210.5,-12 210.5,-6 216.5,-0 222.5,-0 222.5,-0 297.5,-0 297.5,-0 303.5,-0 309.5,-6 309.5,-12 309.5,-12 309.5,-56 309.5,-56 309.5,-62 303.5,-68 297.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"260\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"260\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"260\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 3/40</text>\r\n",
       "<text text-anchor=\"middle\" x=\"260\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.064</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M224.225,-103.726C228.735,-95.0615 233.506,-85.8962 238.043,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"241.153,-78.7859 242.666,-68.2996 234.944,-75.5537 241.153,-78.7859\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d5ccb50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$p_3$</th>\n",
       "      <th>$l_3$</th>\n",
       "      <th>$r_3$</th>\n",
       "      <th>$\\gamma_3$</th>\n",
       "      <th>$l_4$</th>\n",
       "      <th>$p_4$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.193541</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>-0.193541</td>\n",
       "      <td>-1.174473</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>0.144364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.193541</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>-0.193541</td>\n",
       "      <td>-1.174473</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>0.144364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.193541</td>\n",
       "      <td>-1.427166</td>\n",
       "      <td>-0.193541</td>\n",
       "      <td>-1.174473</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>0.144364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.326903</td>\n",
       "      <td>-0.722224</td>\n",
       "      <td>-0.326903</td>\n",
       "      <td>0.394635</td>\n",
       "      <td>-0.603834</td>\n",
       "      <td>0.353467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.796769</td>\n",
       "      <td>1.366221</td>\n",
       "      <td>0.203231</td>\n",
       "      <td>1.115960</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.845666</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     one  y     $p_3$     $l_3$     $r_3$ $\\gamma_3$     $l_4$     $p_4$\n",
       "0    1.0  0  0.193541 -1.427166 -0.193541  -1.174473 -1.779507  0.144364\n",
       "1    1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "2    1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "3    1.0  0  0.193541 -1.427166 -0.193541  -1.174473 -1.779507  0.144364\n",
       "4    1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "..   ... ..       ...       ...       ...        ...       ...       ...\n",
       "450  1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "451  1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "452  1.0  0  0.193541 -1.427166 -0.193541  -1.174473 -1.779507  0.144364\n",
       "453  1.0  0  0.326903 -0.722224 -0.326903   0.394635 -0.603834  0.353467\n",
       "454  1.0  1  0.796769  1.366221  0.203231   1.115960  1.701009  0.845666\n",
       "\n",
       "[455 rows x 8 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iterate(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Iteration 3 argues that height is important, too."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"929pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 928.50 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 924.5,-429 924.5,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M558.5,-425C558.5,-425 372.5,-425 372.5,-425 366.5,-425 360.5,-419 360.5,-413 360.5,-413 360.5,-354 360.5,-354 360.5,-348 366.5,-342 372.5,-342 372.5,-342 558.5,-342 558.5,-342 564.5,-342 570.5,-348 570.5,-354 570.5,-354 570.5,-413 570.5,-413 570.5,-419 564.5,-425 558.5,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"465.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"465.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.103</text>\r\n",
       "<text text-anchor=\"middle\" x=\"465.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"465.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"465.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 37.866</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M433,-306C433,-306 290,-306 290,-306 284,-306 278,-300 278,-294 278,-294 278,-235 278,-235 278,-229 284,-223 290,-223 290,-223 433,-223 433,-223 439,-223 445,-229 445,-235 445,-235 445,-294 445,-294 445,-300 439,-306 433,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"361.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"361.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean texture &lt;= 20.110</text>\r\n",
       "<text text-anchor=\"middle\" x=\"361.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"361.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"361.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 1.187</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M429.418,-341.907C421.351,-332.832 412.719,-323.121 404.406,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"406.778,-311.17 397.518,-306.021 401.546,-315.82 406.778,-311.17\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M663.5,-306C663.5,-306 475.5,-306 475.5,-306 469.5,-306 463.5,-300 463.5,-294 463.5,-294 463.5,-235 463.5,-235 463.5,-229 469.5,-223 475.5,-223 475.5,-223 663.5,-223 663.5,-223 669.5,-223 675.5,-229 675.5,-235 675.5,-235 675.5,-294 675.5,-294 675.5,-300 669.5,-306 663.5,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.053</text>\r\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 14.336</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M501.582,-341.907C509.649,-332.832 518.281,-323.121 526.594,-313.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"529.454,-315.82 533.482,-306.021 524.222,-311.17 529.454,-315.82\"/>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#ff4444\" stroke=\"black\" d=\"M252,-187C252,-187 79,-187 79,-187 73,-187 67,-181 67,-175 67,-175 67,-116 67,-116 67,-110 73,-104 79,-104 79,-104 252,-104 252,-104 258,-104 264,-110 264,-116 264,-116 264,-175 264,-175 264,-181 258,-187 252,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">compactness error &lt;= 0.010</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 170</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = &#45;0.487</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M293.499,-222.907C276.928,-213.016 259.09,-202.368 242.148,-192.254\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"243.762,-189.141 233.381,-187.021 240.174,-195.152 243.762,-189.141\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M431,-187C431,-187 294,-187 294,-187 288,-187 282,-181 282,-175 282,-175 282,-116 282,-116 282,-110 288,-104 294,-104 294,-104 431,-104 431,-104 437,-104 443,-110 443,-116 443,-116 443,-175 443,-175 443,-181 437,-187 431,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"362.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst radius &lt;= 14.490</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 4.372</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M361.847,-222.907C361.918,-214.649 361.993,-205.864 362.066,-197.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"365.568,-197.05 362.154,-187.021 358.568,-196.99 365.568,-197.05\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M83,-68C83,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 83,-0 83,-0 89,-0 95,-6 95,-12 95,-12 95,-56 95,-56 95,-62 89,-68 83,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 41/2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"47.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.797</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M121.561,-103.726C111.536,-94.423 100.889,-84.5428 90.8864,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"93.0954,-72.5362 83.3845,-68.2996 88.3339,-77.6673 93.0954,-72.5362\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M205.5,-68C205.5,-68 125.5,-68 125.5,-68 119.5,-68 113.5,-62 113.5,-56 113.5,-56 113.5,-12 113.5,-12 113.5,-6 119.5,-0 125.5,-0 125.5,-0 205.5,-0 205.5,-0 211.5,-0 217.5,-6 217.5,-12 217.5,-12 217.5,-56 217.5,-56 217.5,-62 211.5,-68 205.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=127</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 127/0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"165.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.171</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M165.5,-103.726C165.5,-95.5175 165.5,-86.8595 165.5,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"169,-78.2996 165.5,-68.2996 162,-78.2996 169,-78.2996\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M321,-68C321,-68 250,-68 250,-68 244,-68 238,-62 238,-56 238,-56 238,-12 238,-12 238,-6 244,-0 250,-0 250,-0 321,-0 321,-0 327,-0 333,-6 333,-12 333,-12 333,-56 333,-56 333,-62 327,-68 321,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"285.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"285.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"285.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 42/0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"285.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=1.000</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M333.828,-103.726C327.607,-94.879 321.018,-85.51 314.774,-76.6303\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"317.531,-74.4664 308.916,-68.2996 311.805,-78.4929 317.531,-74.4664\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M438,-68C438,-68 363,-68 363,-68 357,-68 351,-62 351,-56 351,-56 351,-12 351,-12 351,-6 357,-0 363,-0 363,-0 438,-0 438,-0 444,-0 450,-6 450,-12 450,-12 450,-56 450,-56 450,-62 444,-68 438,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 8/7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.411</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M376.65,-103.726C379.562,-95.3351 382.637,-86.4745 385.575,-78.0072\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"388.972,-78.8944 388.944,-68.2996 382.359,-76.5994 388.972,-78.8944\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#ffaaaa\" stroke=\"black\" d=\"M635,-187C635,-187 498,-187 498,-187 492,-187 486,-181 486,-175 486,-175 486,-116 486,-116 486,-110 492,-104 498,-104 498,-104 635,-104 635,-104 641,-104 647,-110 647,-116 647,-116 647,-175 647,-175 647,-181 641,-187 635,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"566.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"566.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst radius &lt;= 16.770</text>\r\n",
       "<text text-anchor=\"middle\" x=\"566.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"566.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"566.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 4.204</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M568.459,-222.907C568.245,-214.558 568.017,-205.671 567.795,-197.02\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"571.294,-196.928 567.539,-187.021 564.297,-197.107 571.294,-196.928\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M819.5,-187C819.5,-187 677.5,-187 677.5,-187 671.5,-187 665.5,-181 665.5,-175 665.5,-175 665.5,-116 665.5,-116 665.5,-110 671.5,-104 677.5,-104 677.5,-104 819.5,-104 819.5,-104 825.5,-104 831.5,-110 831.5,-116 831.5,-116 831.5,-175 831.5,-175 831.5,-181 825.5,-187 819.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 24.710</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 7.033</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M631.603,-222.907C646.598,-213.106 662.728,-202.563 678.074,-192.533\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"680.051,-195.422 686.507,-187.021 676.221,-189.562 680.051,-195.422\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M552,-68C552,-68 481,-68 481,-68 475,-68 469,-62 469,-56 469,-56 469,-12 469,-12 469,-6 475,-0 481,-0 481,-0 552,-0 552,-0 558,-0 564,-6 564,-12 564,-12 564,-56 564,-56 564,-62 558,-68 552,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"516.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">10</text>\r\n",
       "<text text-anchor=\"middle\" x=\"516.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"516.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 38/4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"516.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.850</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M547.882,-103.726C543.967,-95.1527 539.828,-86.0891 535.886,-77.4555\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"539.043,-75.9423 531.705,-68.2996 532.675,-78.85 539.043,-75.9423\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M669,-68C669,-68 594,-68 594,-68 588,-68 582,-62 582,-56 582,-56 582,-12 582,-12 582,-6 588,-0 594,-0 594,-0 669,-0 669,-0 675,-0 681,-6 681,-12 681,-12 681,-56 681,-56 681,-62 675,-68 669,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"631.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">11</text>\r\n",
       "<text text-anchor=\"middle\" x=\"631.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"631.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 6/9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"631.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.440</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M590.704,-103.726C595.901,-94.9703 601.402,-85.7032 606.625,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"609.638,-78.6853 611.733,-68.2996 603.619,-75.1121 609.638,-78.6853\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M786,-68C786,-68 711,-68 711,-68 705,-68 699,-62 699,-56 699,-56 699,-12 699,-12 699,-6 705,-0 711,-0 711,-0 786,-0 786,-0 792,-0 798,-6 798,-12 798,-12 798,-56 798,-56 798,-62 792,-68 786,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 15/28</text>\r\n",
       "<text text-anchor=\"middle\" x=\"748.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.026</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M748.5,-103.726C748.5,-95.5175 748.5,-86.8595 748.5,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"752,-78.2996 748.5,-68.2996 745,-78.2996 752,-78.2996\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M908.5,-68C908.5,-68 828.5,-68 828.5,-68 822.5,-68 816.5,-62 816.5,-56 816.5,-56 816.5,-12 816.5,-12 816.5,-6 822.5,-0 828.5,-0 828.5,-0 908.5,-0 908.5,-0 914.5,-0 920.5,-6 920.5,-12 920.5,-12 920.5,-56 920.5,-56 920.5,-62 914.5,-68 908.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"868.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"868.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"868.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 4/124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"868.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.186</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M793.184,-103.726C803.379,-94.423 814.207,-84.5428 824.378,-75.2612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"826.98,-77.6255 832.007,-68.2996 822.261,-72.4547 826.98,-77.6255\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d631c10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"422pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 422.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 418,-429 418,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M233,-425C233,-425 47,-425 47,-425 41,-425 35,-419 35,-413 35,-413 35,-354 35,-354 35,-348 41,-342 47,-342 47,-342 233,-342 233,-342 239,-342 245,-348 245,-354 245,-354 245,-413 245,-413 245,-419 239,-425 233,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"140\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"140\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst concave points &lt;= 0.103</text>\r\n",
       "<text text-anchor=\"middle\" x=\"140\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.50</text>\r\n",
       "<text text-anchor=\"middle\" x=\"140\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 455</text>\r\n",
       "<text text-anchor=\"middle\" x=\"140\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 37.866</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M92,-298.5C92,-298.5 12,-298.5 12,-298.5 6,-298.5 0,-292.5 0,-286.5 0,-286.5 0,-242.5 0,-242.5 0,-236.5 6,-230.5 12,-230.5 12,-230.5 92,-230.5 92,-230.5 98,-230.5 104,-236.5 104,-242.5 104,-242.5 104,-286.5 104,-286.5 104,-292.5 98,-298.5 92,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=227</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 218/9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"52\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.989</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M109.469,-341.907C100.92,-330.542 91.6213,-318.178 83.0435,-306.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"85.7542,-304.555 76.9461,-298.667 80.1599,-308.763 85.7542,-304.555\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M322,-306C322,-306 134,-306 134,-306 128,-306 122,-300 122,-294 122,-294 122,-235 122,-235 122,-229 128,-223 134,-223 134,-223 322,-223 322,-223 328,-223 334,-229 334,-235 334,-235 334,-294 334,-294 334,-300 328,-306 322,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"228\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"228\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">mean concave points &lt;= 0.053</text>\r\n",
       "<text text-anchor=\"middle\" x=\"228\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"228\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\r\n",
       "<text text-anchor=\"middle\" x=\"228\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 14.336</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M170.531,-341.907C177.289,-332.923 184.515,-323.315 191.484,-314.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"194.309,-316.116 197.523,-306.021 188.715,-311.909 194.309,-316.116\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M188.5,-179.5C188.5,-179.5 117.5,-179.5 117.5,-179.5 111.5,-179.5 105.5,-173.5 105.5,-167.5 105.5,-167.5 105.5,-123.5 105.5,-123.5 105.5,-117.5 111.5,-111.5 117.5,-111.5 117.5,-111.5 188.5,-111.5 188.5,-111.5 194.5,-111.5 200.5,-117.5 200.5,-123.5 200.5,-123.5 200.5,-167.5 200.5,-167.5 200.5,-173.5 194.5,-179.5 188.5,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"153\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"153\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=57</text>\r\n",
       "<text text-anchor=\"middle\" x=\"153\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 44/13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"153\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=0.479</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M201.979,-222.907C194.764,-211.652 186.922,-199.418 179.671,-188.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"182.604,-186.197 174.261,-179.667 176.711,-189.975 182.604,-186.197\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M373,-187C373,-187 231,-187 231,-187 225,-187 219,-181 219,-175 219,-175 219,-116 219,-116 219,-110 225,-104 231,-104 231,-104 373,-104 373,-104 379,-104 385,-110 385,-116 385,-116 385,-175 385,-175 385,-181 379,-187 373,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"302\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">12</text>\r\n",
       "<text text-anchor=\"middle\" x=\"302\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">worst texture &lt;= 24.710</text>\r\n",
       "<text text-anchor=\"middle\" x=\"302\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">split_quantile = 0.25</text>\r\n",
       "<text text-anchor=\"middle\" x=\"302\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 171</text>\r\n",
       "<text text-anchor=\"middle\" x=\"302\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sim_gain = 7.033</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;12 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>8&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M253.674,-222.907C259.242,-214.105 265.188,-204.703 270.938,-195.612\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"273.984,-197.343 276.371,-187.021 268.068,-193.601 273.984,-197.343\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M279.5,-68C279.5,-68 204.5,-68 204.5,-68 198.5,-68 192.5,-62 192.5,-56 192.5,-56 192.5,-12 192.5,-12 192.5,-6 198.5,-0 204.5,-0 204.5,-0 279.5,-0 279.5,-0 285.5,-0 291.5,-6 291.5,-12 291.5,-12 291.5,-56 291.5,-56 291.5,-62 285.5,-68 279.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"242\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"242\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"242\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 15/28</text>\r\n",
       "<text text-anchor=\"middle\" x=\"242\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;0.026</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M279.658,-103.726C274.91,-95.0615 269.888,-85.8962 265.112,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"268.121,-75.3875 260.246,-68.2996 261.982,-78.7513 268.121,-75.3875\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#22ee22\" stroke=\"black\" d=\"M402,-68C402,-68 322,-68 322,-68 316,-68 310,-62 310,-56 310,-56 310,-12 310,-12 310,-6 316,-0 322,-0 322,-0 402,-0 402,-0 408,-0 414,-6 414,-12 414,-12 414,-56 414,-56 414,-62 408,-68 402,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"362\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples=128</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">+/&#45; = 4/124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"362\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value=&#45;1.186</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M324.342,-103.726C329.09,-95.0615 334.112,-85.8962 338.888,-77.1802\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"342.018,-78.7513 343.754,-68.2996 335.879,-75.3875 342.018,-78.7513\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x26a9d6319d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>y</th>\n",
       "      <th>$p_4$</th>\n",
       "      <th>$l_4$</th>\n",
       "      <th>$r_4$</th>\n",
       "      <th>$\\gamma_4$</th>\n",
       "      <th>$l_5$</th>\n",
       "      <th>$p_5$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.144364</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>-0.144364</td>\n",
       "      <td>-1.186255</td>\n",
       "      <td>-2.135384</td>\n",
       "      <td>0.105705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.144364</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>-0.144364</td>\n",
       "      <td>-1.186255</td>\n",
       "      <td>-2.135384</td>\n",
       "      <td>0.105705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>450</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>451</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>452</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.144364</td>\n",
       "      <td>-1.779507</td>\n",
       "      <td>-0.144364</td>\n",
       "      <td>-1.186255</td>\n",
       "      <td>-2.135384</td>\n",
       "      <td>0.105705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.353467</td>\n",
       "      <td>-0.603834</td>\n",
       "      <td>-0.353467</td>\n",
       "      <td>-1.186255</td>\n",
       "      <td>-0.959710</td>\n",
       "      <td>0.276936</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>454</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.845666</td>\n",
       "      <td>1.701009</td>\n",
       "      <td>0.154334</td>\n",
       "      <td>0.989117</td>\n",
       "      <td>1.997744</td>\n",
       "      <td>0.880560</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>455 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     one  y     $p_4$     $l_4$     $r_4$ $\\gamma_4$     $l_5$     $p_5$\n",
       "0    1.0  0  0.144364 -1.779507 -0.144364  -1.186255 -2.135384  0.105705\n",
       "1    1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "2    1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "3    1.0  0  0.144364 -1.779507 -0.144364  -1.186255 -2.135384  0.105705\n",
       "4    1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "..   ... ..       ...       ...       ...        ...       ...       ...\n",
       "450  1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "451  1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "452  1.0  0  0.144364 -1.779507 -0.144364  -1.186255 -2.135384  0.105705\n",
       "453  1.0  0  0.353467 -0.603834 -0.353467  -1.186255 -0.959710  0.276936\n",
       "454  1.0  1  0.845666  1.701009  0.154334   0.989117  1.997744  0.880560\n",
       "\n",
       "[455 rows x 8 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iterate(4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's stop at Iteration 4. And take a look at the loss."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXhV5bn+8e+ThIQhAQRCwjyLDIJCwAlBtChaFT0OVSuiWBEVx3NOa3s8bU/bc1rrr1VRFCdU6tTWqWoVUBFBUSEgowiESQZDEsYEyPz8/tibNsUd2IHsrAz357pykb3XWjt3ljF31lr7fZe5OyIiIoeKCzqAiIjUTioIERGJSAUhIiIRqSBERCQiFYSIiESkghARkYhUEFLvmdlGM/te0DkAzOw3ZpZnZtlBZxE5EhWESA0xs07AvwN93T09wvKLzCzbzFpVeG6MmW01sxbhx25m+8ysIFw0L5tZywrrzzGzwgrLXzezdjXx/Un9o4IQqTldgB3unhNpobu/DcwGHgQI/+J/HLjF3fdUWHWguycD3YHjgF8e8lKTwst7AsnA/6vOb0IaDhWENChmlmRmD5nZtvDHQ2aWFF7WxszeMbPdZrbTzOaZWVx42U/Cf8nnm9lqMzunktdvYWbTzSzXzDaZ2X1mFhc+xfU+0D781/1zlUS8AzjfzM4jVBQfu/tbkVZ0973AW0DfSpbvBt4ETop6B4lUkBB0AJEa9l/AqYR+aTrwN+A+4L8Jnf7ZAqSG1z0VcDPrDUwChrj7NjPrCsRX8vqPAC0I/XXfGpgFfOvuz5jZ+cAL7t6xsnDunmdmdwIvhvNF/OUPYGbHAZcAn1eyvDXwb0BWZa8hcjg6gpCG5of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HPEzo9M7i8IXiXOCSCNvNACaa2TJgNaHTTAc9CSwzs8Xu/kMzew5YEF72dITrDyKB0NtcRUQkIp1iEhGRiFQQIiISkQpCREQiUkGIiEhEKggREYlIBSEiIhGpIEREJKL/D+2fx9OJfGmtAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(loss[1:])\n",
    "plt.title('loss of XBR')\n",
    "plt.xlabel('iteratoin')\n",
    "plt.ylabel('loss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "class XGBClassifier():\n",
    "    \n",
    "    n_estimators = 100\n",
    "    \n",
    "    #now let's get started\n",
    "    learning_rate=0.3\n",
    "    trees = []\n",
    "    loss = []\n",
    "    residuals = np.zeros([100,n_train])\n",
    "    probabilities = np.zeros([100,n_train])\n",
    "    predictions = np.zeros([100,n_train])\n",
    "    log_of_odds = np.zeros([100,n_train])\n",
    "    gamma = np.zeros([100,n_train])\n",
    "    log_of_odds[0] = [0] * n_train\n",
    "    #calculation\n",
    "    #average_y=y.mean()\n",
    "    #probabilities[0] = [0.5] * n_train\n",
    "    #predictions[0] = [1] * n_train\n",
    "    #residuals[0] = y_train - probabilities[0]\n",
    "    #loss0=-(y_train*np.log(probabilities[0])+(1-y_train)*np.log(1-probabilities[0]))\n",
    "    #loss[0] = np.sum(loss0) / n_train\n",
    "    \n",
    "    \n",
    "    def __init__(self, n_estimators=100):\n",
    "        self.n_estimators = n_estimators\n",
    "        pass\n",
    "    \n",
    "    def iterate(self, i, X_train, y_train):\n",
    "        n_train=len(y_train)\n",
    "        t = XGBTree(max_depth=3, gamma=5)\n",
    "        t.fit(X_train,self.residuals[i], self.probabilities[i])\n",
    "        t.prune()\n",
    "        self.trees.append(t)\n",
    "        \n",
    "\n",
    "        self.gamma[i]=t.predict(X_train)\n",
    "        self.log_of_odds[i+1] = self.log_of_odds[i] + 0.3 * self.gamma[i]\n",
    "        self.probabilities[i+1] = np.array([np.exp(odds)/(np.exp(odds)+1) for odds in self.log_of_odds[i+1]])\n",
    "        self.predictions[i+1] = (self.probabilities[i+1]>0.5)*1.0\n",
    "        self.residuals[i+1]=y_train-self.probabilities[i+1]\n",
    "        _loss=np.sum(-y_train * self.log_of_odds[i+1] + np.log(1+np.exp(self.log_of_odds[i+1])))/n_train\n",
    "        self.loss.append(_loss)\n",
    "\n",
    "    def fit(self, X_train, y_train):\n",
    "        n_train=len(y_train)\n",
    "        #n_estimators=10\n",
    "        #now let's get started\n",
    "        self.learning_rate=0.3\n",
    "        self.loss = []\n",
    "        self.trees = []\n",
    "        self.residuals = np.zeros([self.n_estimators+1, n_train])\n",
    "        self.probabilities = np.zeros([self.n_estimators+1, n_train])\n",
    "        self.predictions = np.zeros([self.n_estimators+1, n_train])\n",
    "        self.log_of_odds = np.zeros([self.n_estimators+1, n_train])\n",
    "        self.gamma = np.zeros([self.n_estimators+1, n_train])\n",
    "        self.log_of_odds[0] = [0] * n_train\n",
    "        self.probabilities[0] = [0.5] * n_train\n",
    "        self.predictions[0] = [1] * n_train\n",
    "        self.residuals[0] = y_train - probabilities[0]\n",
    "        loss0=-(y_train*np.log(probabilities[0])+(1-y_train)*np.log(1-probabilities[0]))\n",
    "        loss0 = np.sum(loss0) / n_train\n",
    "        self.loss.append(loss0)\n",
    "        \n",
    "        for i in range(self.n_estimators):\n",
    "            self.iterate(i, X_train, y_train)\n",
    "\n",
    "    def predict_proba(self, X):\n",
    "        X = np.array(X)\n",
    "        log_of_odds = np.array([0.0] * X.shape[0])\n",
    "        for t in self.trees:\n",
    "            log_of_odds+=t.predict(X)\n",
    "        results = np.array([np.exp(odds)/(np.exp(odds)+1) for odds in log_of_odds])\n",
    "        return results\n",
    "    \n",
    "    def predict(self, X):\n",
    "        proba = self.predict_proba(X)\n",
    "        results = (proba>0.5) * 1.0\n",
    "        return results\n",
    "    \n",
    "    def accuracy(self, X, y):\n",
    "        n=len(y)\n",
    "        y_hat = self.predict(X)\n",
    "        right = np.sum(y_hat == y)\n",
    "        return right/n * 1.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = XGBClassifier(n_estimators=20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "model.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n",
       "       1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n",
       "       1., 1., 1., 1., 1., 1., 1., 0., 1., 1., 1., 1., 0., 1., 0., 0., 1.,\n",
       "       1., 0., 1., 1., 1., 0., 1., 1., 1., 0., 0., 1., 1., 0., 1., 1., 0.,\n",
       "       1., 1., 0., 1., 1., 0., 1., 0., 0., 1., 1., 1., 1., 1., 0., 1., 0.,\n",
       "       1., 0., 0., 1., 1., 0., 0., 1., 1., 0., 1., 1., 1., 1., 0., 0., 1.,\n",
       "       0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0.])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.978021978021978"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.accuracy(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9736842105263158"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.accuracy(X_test, y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x26a9de1afd0>]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAfb0lEQVR4nO3de3hU9b3v8fc3Vy4JIZBwyRUQVAICJhGpt2q1Fq9YdbdQ222fXjw8Le3u2ac9Zbe7tnvbc05v26et0s2xbre9WC/VKmixaHus1lqVgIAERBGRhHAJ13APSb7njxnYY5yQCcxkzeXzep48mVnrN7O+rhk+rvzWb62fuTsiIpL6soIuQERE4kOBLiKSJhToIiJpQoEuIpImFOgiImkiJ6gNl5SU+JgxY4LavIhISlq+fPlOdy+Nti6wQB8zZgwNDQ1BbV5EJCWZ2bs9rVOXi4hImlCgi4ikCQW6iEiaiCnQzWymma03sw1mNj/K+q+Z2crwzxoz6zSzYfEvV0REetJroJtZNrAAuAqoAeaYWU1kG3f/obtPc/dpwD8Bz7v77kQULCIi0cVyhD4d2ODuG929HXgImHWS9nOAB+NRnIiIxC6WQC8HmiKeN4eXvY+ZDQJmAo/1sP42M2sws4bW1ta+1ioiIicRS6BblGU93XP3OuCvPXW3uPs97l7v7vWlpVHHxfdq/bb9/O8l6zjc3nlKrxcRSVexBHozUBnxvAJo6aHtbBLc3dK85xD3vLCR1c17E7kZEZGUE0ugLwMmmNlYM8sjFNqLuzcys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/vhVYFKVNv0+WbmYzga8D17v7oR7axPK5x7uuyPMuH+1he0FNLn8F8Ia7N0dbmcj9dZJs6L/vV7zP9Mb5rPHVhM4Uvw18M7xsLjA3/NiABeH1rwP1/VDTRYT+FFoNrAz/XN2trnlAI6Ez1S8DF/RDXePC21sV3nZS7K/wdgcRCuiiiGWB7C9C/1PZChwjdFT0WWA48CfgrfDvYeG2ZcCSk30fE1zXBkL9qse/Zwu719XT557gun4V/v6sJhQ6o5Nhf4WX33/8exXRtl/210myod++X7r0X0QkTSRzl4uIiPSBAl1EJE0o0EVE0oQCXUQkTSjQRUTShAJdRCRNKNBFRNLE/weT41tAIVnNeAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(model.loss)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.6931471805599453,\n",
       " 0.4920249761454543,\n",
       " 0.3697460183734479,\n",
       " 0.2950323142486193,\n",
       " 0.240828142219078,\n",
       " 0.2054103758337053,\n",
       " 0.17632670630889824,\n",
       " 0.1582781253866065,\n",
       " 0.13967314148610582,\n",
       " 0.12400946534008836,\n",
       " 0.11523353693563752,\n",
       " 0.1064878341139898,\n",
       " 0.10062734461302421,\n",
       " 0.1006035233070387,\n",
       " 0.10059143677695329,\n",
       " 0.10058530987953208,\n",
       " 0.10058220601751336,\n",
       " 0.10058063431703279,\n",
       " 0.10057983870693661,\n",
       " 0.1005794360509627,\n",
       " 0.10057923230001369]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.loss"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
